UIDevice方向和UIInterface方向有什么区别?
UIDevice方向: -
[[UIDevice currentDevice] orientation]
Run Code Online (Sandbox Code Playgroud)
UIInterface方向: -
[[UIApplication sharedApplication] statusBarOrientation]
Run Code Online (Sandbox Code Playgroud) 你好,我有我的启动画面,我想在横向模式和所有其他屏幕在potrait模式下显示.我的根视图控制器充当启动屏幕我在viewdidload方法中编写此代码
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
Run Code Online (Sandbox Code Playgroud)
但是这段代码没有用,并告诉我UI设备可能无法响应setorentation请指导我如何才能更改第一个启动画面的其他屏幕以及其他屏幕应该处于potrait模式