Created
March 13, 2012 16:13
-
-
Save ekdevdes/2029657 to your computer and use it in GitHub Desktop.
Find out if the device has iOS4 or iOS5 installed, and perform a version-specific action based on the results.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *versions = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."]; | |
if ( 5 == [[versions objectAtIndex:0] intValue] ) { /// iOS5 is installed | |
// Perform iOS-5 actions here | |
} else { /// iOS4 is installed | |
// Perform iOS-4 actions here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment