这是我的代码:
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];
答案 0 :(得分:0)
我找出原因:
需要更改navigationController.navigationItem.rightBarButtonItem = anotherButton;
至:self.navigationItem.rightBarButtonItem = anotherButton;