Skip to content

Instantly share code, notes, and snippets.

@xionglun
Created November 4, 2014 14:01
Show Gist options
  • Save xionglun/24e2018bad3390c8a184 to your computer and use it in GitHub Desktop.
Save xionglun/24e2018bad3390c8a184 to your computer and use it in GitHub Desktop.

Revisions

  1. xionglun created this gist Nov 4, 2014.
    6 changes: 6 additions & 0 deletions osVersion
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    switch UIDevice.currentDevice().systemVersion.compare("8.0.0", options: NSStringCompareOptions.NumericSearch) {
    case .OrderedSame, .OrderedDescending:
    println("iOS >= 8.0")
    case .OrderedAscending:
    println("iOS < 8.0")
    }