How to check iOS version?

后端 未结 30 2515
一生所求
一生所求 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条回答
  •  猫巷女王i
    2020-11-21 06:58

    +(BOOL)doesSystemVersionMeetRequirement:(NSString *)minRequirement{
    
    // eg  NSString *reqSysVer = @"4.0";
    
    
      NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
    
      if ([currSysVer compare:minRequirement options:NSNumericSearch] != NSOrderedAscending)
      {
        return YES;
      }else{
        return NO;
      }
    
    
    }
    

提交回复
热议问题