Skip to content

Instantly share code, notes, and snippets.

@ohtwo
Created February 14, 2019 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohtwo/542d80bf68d3d88fc740cd585bd6c054 to your computer and use it in GitHub Desktop.
Save ohtwo/542d80bf68d3d88fc740cd585bd6c054 to your computer and use it in GitHub Desktop.
Swift Version Test
```swift
#if swift(>=4.2)
print("Swift4.2")
#elseif swift(>=4.1)
print("Swift4.1")
#elseif swift(>=4.0)
print("Swift4.0")
#elseif swift(>=3.3)
print("Swift3.3")
#elseif swift(>=3.2)
print("Swift3.2")
#elseif swift(>=3.1)
print("Swift3.1")
#elseif swift(>=3.0)
print("Swift3.0")
#else
print("below Swift3.0")
#endif
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment