Question

This is my code :

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:vc];
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"RETURN" style:UIBarButtonItemStylePlain target:self action:@selector(refreshPropertyList:)];
navigationController.navigationItem.rightBarButtonItem = anotherButton;
[anotherButton release];       
[IpadAppDelegate.stackController presentModalViewController:navigationController animated:YES];

enter image description here

Était-ce utile?

La solution

I find out the reason :

need change navigationController.navigationItem.rightBarButtonItem = anotherButton;

to: self.navigationItem.rightBarButtonItem = anotherButton;

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top