How to check iOS version programmatically

No comments on How to check iOS version programmatically

Written by

in

To check the iOS version you can use the following method:

- (BOOL)iOSVersion5 {
    NSLog(@"System Version is %@", \
[[UIDevice currentDevice] systemVersion]);
    NSString *ver = [[UIDevice currentDevice] systemVersion];
    float ver_float = [ver floatValue];
    if (ver_float < 5.0) {
        return NO;
    }
    else {
        return YES;
    }
}

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *