Skip to content

Instantly share code, notes, and snippets.

@mrakowski
Last active November 4, 2015 20:18
Show Gist options
  • Save mrakowski/4003093 to your computer and use it in GitHub Desktop.
Save mrakowski/4003093 to your computer and use it in GitHub Desktop.
Check iOS selector availability
// Check for the existence of a selector
if ([_pageControl respondsToSelector:@selector(pageIndicatorTintColor)] == YES) {
}
// Check device system version
+ (BOOL)isRunningiOS5 {
// This will only return true in iOS 5 and up.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 5.0f) {
return YES;
} else {
return NO;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment