I am animating to a view with it sliding from right to left. The left bar button looks like it is in the navigation but the rightbarbutton seems to animated weirdly, almost like at first its not part of the navigation bar.
I am wanting to know if there is something wrong in my code… or if there is another way of doing this?
- (void)viewWillAppear:(BOOL)animated
{
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Skip" style:UIBarButtonItemStyleBordered target:nil action:nil];
[super viewWillAppear:animated];
}
Any help would be greatly appreciated.
Set
rightBarButtonItemin the view controller’sinit...method. It only has to be done once in the view controller’s lifetime.