简体   繁体   中英

UINavigationController swipe to go back issue

I am creating NavigationController app which contains login and other pages. I am hiding navigation controller in login page and displaying in other pages. I have back/logout button on the left side of the second screen. when i try to drag from second screen (i am not full swipe to the login screen), navigation bar in second screen becomes hidden. It never appears again on other pages. I need to go back to login and push to second view to make navigation bar to show. When i click back/logout button instead of swipe, it works.

Any idea on solving this issue

In your viewcontroller that you want NavigationBar visible use this code

-(void) viewWillAppear: (BOOL) animated {
 [super viewWillApper:animated];
 [self.navigationController setNavigationBarHidden:NO];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM