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

有帮助吗?

解决方案

I find out the reason :

need change navigationController.navigationItem.rightBarButtonItem = anotherButton;

to: self.navigationItem.rightBarButtonItem = anotherButton;

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top