好吧,我猜我的问题很简单.
我使用NSFoundationVersionNumber来检查我的应用程序的版本,并使其兼容iOS6和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
}
Run Code Online (Sandbox Code Playgroud)
好吧,据我所知,Apple发布了6.1.X版本.所以,使用第二个"else-if"语句,版本6.1.X被排除在我所做的兼容版本列表中?如果答案是肯定的,那么如果设备在6.1.X版本上运行,我该如何判断?
非常感谢你 :)
如果NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_1
是,则设备具有6.1.X.
如果NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_0
是,则设备具有6.0.X.
如果NSFoundationVersionNumber < NSFoundationVersionNumber_iOS_6_0
是,则设备具有5.1.X及以下.
如果NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1
是,则设备具有7.0及更高版本.