tags:

views:

194

answers:

1

Hi friends

Do anyone know how to hide a rightbarbutton of a navigation controller... In my application i have a edit button as a rightbarbutton of a navigation controller... i want to hide this button when some operations are done....

+1  A: 

Try

self.navigationItem.rightBarButtonItem = nil;

When you want it back though you will have to instanciate a button i.e.

UIBarButtonItem *rightBarButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch
                                                                                target:self
                                                                                action:@selector(searchBar:)];
self.navigationItem.rightBarButtonItem = rightBarButton;
[rightBarButton release];
Lee Armstrong