7
我得到的Xcode 4.3下運行我的應用程序時,上面的主題行警告。從枚舉類型「UIBarButtonSystemItem」不同的枚舉類型隱式轉換「UIBarButtonItemStyle」 - iPad的 - 的iOS5
這裏是有問題的代碼:
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];
誰能幫助?
謝謝!
+1,完全正確的答案。 –
把這個鏈接回答完成。 [式必須是在UIBarButtonItemStyle定義的常量(http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html)和[UIBarButtonItemStyle的typedef](HTTP: //developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html) –