Tuesday, July 10, 2012

How to find OS version of iOS device.


NSString *currentOS = [[UIDevice currentDevice] systemVersion];



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

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



                

No comments:

Post a Comment