强制旋转到风景

Cos*_*Inc 1 iphone uiview autorotate

我希望我的应用程序的轮换固定为景观......

我做了一些研究,但大多数帖子都是关于检测变化,

我找不到任何关于强迫一个人的事.

谁能帮助我?

War*_*ior 5

试试这个

在plist中,将支持的界面方向更改为Lansdscape

要么

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); // home button on right
}
Run Code Online (Sandbox Code Playgroud)

祝一切顺利