gpt4 book ai didi

ios - 下面的方法可以决定使用自动布局吗?

转载 作者:行者123 更新时间:2023-11-29 04:14:58 25 4
gpt4 key购买 nike

(BOOL)isSupportAutoLayOut
{
int version = [[[UIDevice currentDevice].systemVersion substringToIndex:1] intValue];
if(version == 6)
{
return YES;
}
return NO;
}

我想在 iPhone 和 iPad 上支持 iOS 5 和 iOS 6 系统。

有bug吗?

最佳答案

像这样使用

-(BOOL)isSupportAutoLayOut
{
float version = [[[UIDevice currentDevice].systemVersion] floatValue];
if(version >= 6.0)
{
return YES;
}
return NO;
}

关于ios - 下面的方法可以决定使用自动布局吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13855090/

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