2012年11月1日星期四

[iOS]UITableViewControllerが回転しない

autosizing をチェックした
shouldAutorotateToInterfaceOrientationがYES (Deprecated in iOS 6)
shouldAutorotateもYES (available in iOS 6)
ですが、
画面が回転しない。

悩むところで、
[Application windows are expected to have a root view controller at the end of application launch]の警告に気付いた。

やはりiOS 6では新しい書き方になった:

// [window addSubview:navigationController.view];
window.rootViewController = navigationController;


それて、解決、回転できた。

没有评论:

发表评论