如何手动调用shouldAutorotateToInterfaceOrientation?
此功能的内容有开/关标志,所以当我更改此标志时,我需要旋转屏幕。
示例:
答案 0 :(得分:5)
如果您的目标是iOS 5,则可以致电
[UIViewController attemptRotationToDeviceOrientation]
将使用设备的当前方向调用shouldAutorotateToInterfaceOrientation:
,如果该方法返回YES
,则会旋转界面。