UINavigationItem setHidesBackButton: YES will not prevent return

This is strange, I know, but even if you pointed hidesBackButton to YES for the UINavigationItem associated with your view, you can go back just by touching the area that should have been a back button.

Sharing my solution ... ( yet to come )

0
iphone uinavigationcontroller
Aug 05 '09 at 11:04
source share
2 answers

At first I thought it was a simulator error and was downloaded to the device. But when I reproduced the same behavior, I began to think how to get rid of this behavior (since it was important to me). It came to this decision:

[self.navigationItem setLeftBarButtonItem:[[[UIBarButtonItem alloc] initWithCustomView:[[UIView new] autorelease]] autorelease]]; 

And to display the back button again, you write:

 [self.navigationItem setLeftBarButtonItem:nil]; 

It's simple. Use it as a workaround guys! It is very strange that this error persisted even in iPhone OS 3.0 ...

+7
Aug 05 '09 at 12:18
source share

I think hiding the bar button also works like

self.navigationItem.hidesBackButton = TRUE;

+1
Aug 06 '09 at 4:41
source share



All Articles