I have the next code:
- (id) initWith...{
if (self == [super initWithNibName:@"EmptyViewController"
bundle:[NSBundle mainBundle]]){
...
back_btn = [[UIBarButtonItem alloc] initWithTitle:@"Back"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(backParentViewController)];
self.navigationItem.leftBarButtonItem = back_btn;
update_btn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh
target:self action:@selector(refresh)];
self.navigationItem.rightBarButtonItem = update_btn;
self.title = [utils LabelFromKey:@"commons.nav-button.reports"];
self.navigationItem.title = [utils LabelFromKey:@"commons.nav-button.reports"];
}
But the rightBarButton is not visible.
I try to move the code to the viewDidLoad, and to set the buttons to the navigationController.navigationItem but doesn't show the button
self.navigationController.navigationItem.rightBarButtonItem = update_btn;
Any suggestions ¿?
Thank you