当在xCode 4.3下运行我的应用程序时,我在上面的主题行中得到了警告。
下面是有问题的代码:
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:map];
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
style:UIBarButtonSystemItemDone target:self action:@selector(removeCurrent)];
map.navigationItem.rightBarButtonItem = rightButton;
[self presentModalViewController:navigationController animated:YES];有人能帮上忙吗?
谢谢!
发布于 2011-10-28 01:34:39
UIBarButtonSystemItemDone应为UIBarButtonItemStyleDone。系统项被用在一个不同的初始化方法中-- initWithBarButtonSystemItem: --这实际上可能对你更好,因为它将返回一个本地化的完成按钮,而不是你现在拥有的固定文本。
https://stackoverflow.com/questions/7919879
复制相似问题