Last active
August 29, 2015 14:02
-
-
Save jarsen/9a22cea2f52aeac8be74 to your computer and use it in GitHub Desktop.
Add string literal to NSURL
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
extension NSURL : StringLiteralConvertible { | |
public class func convertFromStringLiteral(value: String) -> Self { | |
return self(string: value) | |
} | |
public class func convertFromExtendedGraphemeClusterLiteral(value: String) -> Self { | |
return self(string: value) | |
} | |
} | |
let url : NSURL = "http://apple.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment