切换到横向方向

时间:2013-10-18 21:44:30

标签: ios xcode

我有一个X-Code项目,它是Portrait,它不会从那里移动。它总是在肖像上。我怎样才能使它成为1页,默认情况下是风景?

如果你能尽可能详细地了解,那就太棒了。我是X-Code的新手。

2 个答案:

答案 0 :(得分:1)

你可以做这样的事情

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return UIInterfaceOrientationIsLandscapeRight(toInterfaceOrientation);
}

-(NSUInteger)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskLandscapeRight;
}

答案 1 :(得分:1)

按照屏幕截图中的这两个步骤,您可以选择任何您想要的方向!

enter image description here

或者如果您想要特定视图,请按照this