Is there a way to customize the method that is called when someone touches the back button in my UINavigationController? I need to check which nib is being loaded so I can configure the UINavigationController properly (mainly set the navigation bar to hidden for one view).
A:
There are many ways to do that:
1/ When you click the back button, some view will be called with viewWillAppear:, check for that view.
2/ The navigationController holds a list of UIViewController, just get the second top UIViewController
3/ the back button item will point to a UINavigationItem, get that UINavigationItem, using the title, you can decide which views you are in
vodkhang
2010-07-21 15:21:22
Thanks! I used had tried to use a viewWillAppear method initially, but at the end of it I forgot to call [super viewWillAppear:animated]; so it didn't work. I added that in and it works like a charm now!
swiecki
2010-07-21 15:49:52