1. New class file Firstviewcontroller,subclass Of:uiviewcontroller
2. New class file Mynavigationcontroller,subclass Of:uinavigationcontroller
3.APPDELEGATE.M contains the above two header files and then writes in Didfinishlaunchingwithoptions
Firstviewcontroller *viewcontroller = [[Firstviewcontroller alloc]initwithnibname:nil Bundle:nil];
Mynavigationcontroller *navigationcontroller = [[Mynavigationcontroller alloc]initwithrootviewcontroller: Viewcontroller];
Self.window = [[UIWindow alloc]initwithframe:[[uiscreen Mainscreen] bounds]];
Self.window.rootViewController = Navigationcontroller;
Self.window.backgroundColor = [Uicolor Whitecolor];
[Self.window Makekeywindow];
return YES;
4. Return button settings
Back button
Uibarbuttonitem *return = [[Uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemreply target: Self action: @selector (pop)];
Self.navigationItem.leftBarButtonItems = @[return];
iOS Navigationcontroller code creation