1

I'm using storyboard in my app and I'm trying to move bac to a previous view controller using

[self.navigationController popViewControllerAnimated:YES];

It works fine but it gives me the right viewcontroller but it removes the navigation bar from it and I cn't figure out why I used it in other places in my project and it worked with no problems and it's making me go crazy :D

Some body plz help Thanks.

Ashraf Hussein
  • 589
  • 1
  • 8
  • 19
  • Can you show storyBoard screen shot from NavigationController to your ViewController with pop? – LE SANG Feb 06 '13 at 10:58
  • http://img197.imageshack.us/img197/3313/screenshot20130206at104.png this is the storyboard screen shot – Ashraf Hussein Feb 06 '13 at 11:18
  • yes I did it's working fine with other view controllers – Ashraf Hussein Feb 06 '13 at 11:30
  • 1
    I found the problem the problem was that the viewcontroller that i'm popping from had the navigation bar hidden set to yes and it passed that property to the other viewcontroller so all I hadd to do was reset the property to no before popping the view – Ashraf Hussein Feb 06 '13 at 11:42

2 Answers2

2

I found the problem the problem was that the viewcontroller that i'm popping from had the navigation bar hidden set to yes and it passed that property to the other viewcontroller so all I hadd to do was reset the property to no before popping the view

Ashraf Hussein
  • 589
  • 1
  • 8
  • 19
0

You can also set the navigation bar hidden property to hidden or not in every view controller's viewWillAppear method not from viewDidLoad.

Apple
  • 736
  • 1
  • 6
  • 24