如何检查iOS版本是iOS 6? [英] How to check iOS Version is iOS 6?

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

问题描述


可能重复:

检查iPhone iOS版本

我想在iOS中查看iOS版本。

I want to check iOS Version in iOS.

因为我的代码仅适用于iOS 6。

Because i have some of codes only for iOS 6.

那我该怎么办?

推荐答案

检查此GitHub要点
https://gist.github.com/998472

Check this GitHub Gist https://gist.github.com/998472

您可以添加代码或将其包含在您的...中 - Prefix.pch文件,以便您可以在任何需要的地方使用它。

You can add the code or include it in your ...-Prefix.pch file so you can use it wherever you need it.

编辑

我将举例说明如何使用Gist中的代码,以便人们可以检查它是否对他们的案例有用。这也可以在Gist上找到。

I'm leaving an example of how you can use the code from Gist so people can check if it's useful for their case. This can also be found over the Gist.

/*
 *  Usage
 */ 

if (SYSTEM_VERSION_LESS_THAN(@"4.0")) {
    ...
}

if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"3.1.1")) {
    ...
}

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

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