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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -