How to check iOS version?

后端 未结 30 2411
一生所求
一生所求 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:19

    Try:

    NSComparisonResult order = [[UIDevice currentDevice].systemVersion compare: @"3.1.3" options: NSNumericSearch];
    if (order == NSOrderedSame || order == NSOrderedDescending) {
        // OS version >= 3.1.3
    } else {
        // OS version < 3.1.3
    }
    

提交回复
热议问题