uitabbarcontroller - iPhone : Hiding the tab bar on the current view -
is there way hide , show tab bar on current view on. not sethidesbottombarwhenpushed because works view pushed.
you can navigation controller
[view.navigationcontroller setnavigationbarhidden:yes animated:yes];
but surely there way tab bar.
add code applicationdidfinishlaunching method:
[[nsnotificationcenter defaultcenter] addobserver:self
selector:@selector(toggletabbarhidden)
name:@"toggletabbarhidden"
object:nil];
make method in appdelegate so:
-(void)toggletabbarhidden{ for(uiview *view in self.window.subviews) { if([view iskindofclass:[uitabbar class]]) { if(view.hidden){ view.hidden = no; break; } view.hidden = yes; } } }
now, whenever want show/hide uitabbar, fire notification:
[[nsnotificationcenter defaultcenter] postnotificationname:@"toggletabbarhidden"
object:nil];
this work anywhere within app.
Comments
Post a Comment