BWSnippet

iOS check version of swift

iOS check version of swift

Check the version of swift you are currently using

        #if swift(>=3.0)
            print("Hello, Swift 3!")
        #elseif swift(>=2.3)
            print("Hello, Swift 2.3!")
        #elseif swift(>=2.2)
            print("Hello, Swift 2.2!")
        #elseif swift(>=2.1)
            print("Hello, Swift 2.1!")
        #endif

Tags

iOS check version of swift