我正试图自动旋转一个视图,并且我遇到了与这里解释的相同的问题:willRotateToInterfaceOrientation not being called。
尽管我在每个继承了UIViewController
的子类中都实现了shouldAutorotateToInterfaceOrientation
并返回了YES,但willRotateToInterfaceOrientation
没有被调用。
也许有人可以告诉我我漏掉了什么。 我有以下视图控制器结构(希望这足够清晰..):
NavigationController (Programatically)
-with root > TabBarController (Programatically)
-with tab item > NavigationController (Programatically)
-with root > UITableViewController (a Subclass)
-pushed to navigator controller > UIViewController (a Subclass).
我希望有人能够帮助我。提前感谢!