我试图让我的应用程序在设备本身旋转时旋转界面,但我做不到。我在 plist 信息文件中添加了支持的接口,并为 shouldRotateToInterfaceOrientation 返回了 yes。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
返回是;
} 别的 {
返回否;
}
}
这是如何实现轮换的?
请帮忙!