Created
November 17, 2014 12:34
-
-
Save Gernot/1095618ad28cd8a4f265 to your computer and use it in GitHub Desktop.
This file contains 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 { | |
convenience init?(optionalString: String?) { | |
if (optionalString == nil) { | |
self.init() //Yeah, this makes sense. Go on, try deleting it. Compiler will complain… (At least in Xcode 6.1) | |
return nil | |
} | |
self.init(string:optionalString!) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment