Created
          November 4, 2014 14:01 
        
      - 
      
- 
        Save xionglun/24e2018bad3390c8a184 to your computer and use it in GitHub Desktop. 
    iOS swift detect OS version
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | switch UIDevice.currentDevice().systemVersion.compare("8.0.0", options: NSStringCompareOptions.NumericSearch) { | |
| case .OrderedSame, .OrderedDescending: | |
| println("iOS >= 8.0") | |
| case .OrderedAscending: | |
| println("iOS < 8.0") | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment