NSFoundationVersionNumber和iOS版本 [英] NSFoundationVersionNumber and iOS Versions

查看:111
本文介绍了NSFoundationVersionNumber和iOS版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯,我的问题非常简单。

Well, my questions is really simple i guess.

我使用NSFoundationVersionNumber来检查我的应用程序的版本,并使其兼容iOS6和iOS7。 / p>

I use NSFoundationVersionNumber to check the version of my app , and make it both compatible with iOS6 and iOS7 .

if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1 ){
//Here goes the code for iOS 7 
}

else if (NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_1){
//Here goes the code for iOS 6.1
}

好吧,据我所知,Apple发布了6.1.X版本。所以,使用第二个else-if语句,版本6.1.X被排除在列表之外我做的兼容版本?如果答案是肯定的,那么我如何确定该设备是否在6.1.X版本上运行?

Well,as far as i know, Apple has released 6.1.X versions.So, using the second "else-if" statement, versions 6.1.X are excluded from the list of compatible versions i make?If yes is the answer, then how can i determine ,if the device is running on 6.1.X versions?

非常感谢:)

推荐答案

NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_1 为真时,设备有6.1.X.

When NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_1 is true, then the device has 6.1.X.

NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_0 为真时,设备有6.0.X。

When NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_0 is true, the device has 6.0.X.

NSFoundationVersionNumber< NSFoundationVersionNumber_iOS_6_0 为真,设备有5.1.X及以下。

When NSFoundationVersionNumber < NSFoundationVersionNumber_iOS_6_0 is true, the device has 5.1.X and below.

NSFoundationVersionNumber> NSFoundationVersionNumber_iOS_6_1 为true,设备为7.0及以上。

When NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1 is true, the device has 7.0 and above.

这篇关于NSFoundationVersionNumber和iOS版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆