2013-01-15 87 views
0

rightBarButtonItem这是我的代码:无法显示在iPad上

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

回答

0

我找出原因:

需要改变navigationController.navigationItem.rightBarButtonItem = anotherButton;

到:self.navigationItem.rightBarButtonItem = anotherButton;

相关问题