gpt4 book ai didi

iphone - 在iOS 6,iPhone中处理方向?

转载 作者:行者123 更新时间:2023-12-01 16:52:03 24 4
gpt4 key购买 nike

iOS 6需要哪些所有方法来处理方向?我用的是波纹管,够了吗?

- (BOOL)shouldAutorotate
{
return YES;
}

- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations

if (UIInterfaceOrientationLandscapeLeft == interfaceOrientation || UIInterfaceOrientationLandscapeRight == interfaceOrientation) {
return YES;
} else {
return NO;
}
}

我想让该应用程序在iOS5和iOS6中都能正常工作

最佳答案

在执行所有步骤之前,请在Targets->Summary中设置支持的方向...

关于iphone - 在iOS 6,iPhone中处理方向?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14849693/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com