Monday, July 16, 2012

How to find OS version of iOS device.


NSString *currentOS = [[UIDevice currentDevicesystemVersion];



How to check if current OS is minimum version you need. Suppose minimum you need is 4.2

NSString *currentOS = [[UIDevice currentDevicesystemVersion];
if ([currentOS compare:@"4.2" options:NSNumericSearch] != NSOrderedAscending)
{
     NSLog(@"Yes, it is greater than or equal to 4.2");
}

No comments:

Post a Comment