OC:
- (BOOL)isSystemVersioniOS9 {
//check systemVerson of device
UIDevice *device = [UIDevice currentDevice];
float sysVersion = [device.systemVersion floatValue];
if (sysVersion >= 9.0f) {
return YES;
}
return NO;
}
Swift:
func isSystemVersioniOS9() -> Bool {
let device = UIDevice.currentDevice()
let sysVersion = Float(device.systemVersion)
if (sysVersion >= 9.0) {
return true;
}
return false;
}