PDA

View Full Version : Preventing Navigation Control from poping view




slammers
Oct 12, 2008, 01:43 PM
I have an App that pushes many UIViewControllers. If one view has data that has been changed I need to prevent the user from pressing the standard back navigation button.

I thought I could just implement the UINavigationBarDelegate Protocol function shouldPopItem:

In Interface builder I added a NavigationBar and set the Delegate to the FileOwner.

However, if I add the function

- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item

It never gets called.

Is it not possible to prevent the Navigation controller for poping a view?

Thanks
Shawn