Hide the rightNavigationBar button item in iPhone
In Xcode 4. using these won't work;
self.navigationItem.leftBarButtonItem.enabled=NO;
self.navigationItem.leftBarButtonItem=nil;
self.navigationController.navigationBar.backItem.hidesBackButton=YES;
[self.navigationItem.leftBarButtonItem release];
I'm actually interested why you mention rightBarButtonItem? When you navigate, its the leftBarButtonItem that changes.
What Does Work;
1) self.title =@"";
nulling the title of the screen, when the navigation controller pushes a detail view onto the stack, no back button is created.
2) replacing the leftBarButtonItem
with something else changes the button, but doesn't solve your problem.
3) An alternative. Hide the navigation bar; [self.navigationController setNavigationBarHidden:YES animated:YES];
Hi it does not hide but make it disable
self.navigationItem.rightBarButtonItem.enabled = NO;
put this function in all the classes -
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.navigationItem.rightBarButtonItem = nil;
} return self;
}