ios - UINavigationController.navigationBar setHidden:NO doesn't work? -


i have homeviewcontroller , has property searchviewcontroller.

homeviewcontroller delegate of searchviewcontrollerdelegate can pop searchviewcontroller when click button in searchviewcontroller.view (i use pushviewcontrolleranimated: push searchviewcontroller view controller stack.

i want show navigationbar when searchviewcontroller popped up.

however

[self.navigationcontroller.navigationbar sethidden:no]; 

is not working.

i've checked navigationbar not nil can't figure out problem might be.

actual code

#pragma mark - hometabsearchtableviewdelegate -(void)parentviewcontrollerpop{     [self.navigationcontroller popviewcontrolleranimated:yes];     [self.navigationcontroller.navigationbar sethidden:no]; } 

searchviewcontroller popped successfully, navigationbar problem.

on homeviewcontroller

-(void)viewwillappear:(bool)animated{     [super viewwillappear:animated];     [self.navigationcontroller setnavigationbarhidden:no];   //shows        //or use    // [[self navigationcontroller] setnavigationbarhidden:no animated:yes]; }  -(void)viewwilldisappear:(bool)animated{     [super viewwilldisappear:animated];     [self.navigationcontroller setnavigationbarhidden:yes];    // hides        //or use    // [[self navigationcontroller] setnavigationbarhidden:yes animated:yes]; } 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -