How to check iOS version?

后端 未结 30 2395
一生所求
一生所求 2020-11-21 06:37

I want to check if the iOS version of the device is greater than 3.1.3 I tried things like:

[[UIDevice currentDevice].systemVersion         


        
30条回答
  •  隐瞒了意图╮
    2020-11-21 07:15

    if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
            // Your code here
    }
    

    Where of course, NSFoundationVersionNumber_iOS_6_1 must be changed to by applicable for the iOS version you want to check. What I have now written will probably be used a lot when testing if a device is running iOS7 or a previous version.

提交回复
热议问题