The time of common function triggering of navigation controller
when the view controller's View trigger when it will appear
-(void) viewwillappear: ( BOOL ) Animated
when the view controller's View triggered when already present
-(void) viewdidappear: ( BOOL ) Animated
when the view controller's View triggers when it's going to disappear
-(void) viewwilldisappear: ( BOOL ) Animated
when the view controller's View triggered when it has disappeared
-(void) viewdiddisappear: ( BOOL ) Animated
When the previous interface ,push Next interface Span style= "FONT-SIZE:12PX; Color: #1d9421; font:18.0px Menlo "", a push B, four methods of execution order a (viewwilldisappear) >b (viewwillappear) >a (viewdiddisappear) >b ( viewdidappear)
when the next interface Pop previous interface, such as B pop A, four method execution order B (viewwilldisappear) >a (viewwillappear) >b (viewdiddisappear) >a (viewdidappear)
Navigationbar Common Properties
I. TheNavigationbarDirect Configuration,so the operation for each interfaceNavigationbarwill have an impact on the content displayed on the(the effect is the same)
1.ModifyNavigationbarColor
Self.navigationController.navigationBar.barTintColor = [Uicolor Redcolor];
2. Turn off the navigationbar effect of the wool glass
self.navigationController.navigationBar.translucent = NO;
3. Hide the navigationbar
Self.navigationController.navigationBarHidden = YES;
4. set a picture for Navigationbar
Different sizes of picture effects are different:
1.320 *,will only giveNavigationbarattached sheet
2.height less than,and greater than -and less than:is tiledNavigationbarand display on the status bar
3.height equals:The whole picture inNavigationbarand display on the status bar
[Self.navigationController.navigationBar setbackgroundimage:[uiimage imagenamed:@ "32050"] forbarmetrics: Uibarmetricsdefault];
two. For each interface the Navigationbar individually tailored to the content displayed on the ( Each interface shows different content )
individually Customizable , Modify the View controller's Navigationitem
1.set the interface'stitle
self.navigationItem.title = @ "Great East Development";
2.ModifyTitleview (Middle Display View)
Uisegmentedcontrol*segment = [[UisegmentedcontrolAlloc]Initwithitems:@[@"Grouping",@"Friends"]]; Self.Navigationitem.Titleview= segment; [SegmentRelease];
3.ModifyNavigationbar Color Self.navigationController.navigationBar.barTintColor = [Uicolor whitecolor];
4.ModifyNavigationbar,Show content on the right
Uibarbuttonitem *right = [[Uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemadd target: Self action: @selector (add:)];
Self.navigationItem.rightBarButtonItem = right;
[right release];
5.modify Navigationbar, show content on left
Uibarbuttonitem*left = [[UibarbuttonitemAlloc]Initwithbarbuttonsystemitem:UibarbuttonsystemitemaddTarget: SelfAction:@selector(add:)];
Self.Navigationitem.Leftbarbuttonitem= left;
[ left release];
iOS navigation controller common functions and Navigationbar Common Properties