Last active
August 29, 2015 14:13
-
-
Save erica/e2fbd5c910311d1c96d2 to your computer and use it in GitHub Desktop.
Using a postfix operator to bridge to objective c
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
postfix operator ⟹ {} | |
postfix func ⟹ <T:_ObjectiveCBridgeable>(obj : T) -> AnyObject { return _bridgeToObjectiveC(obj)! } | |
var s = "23.692" | |
NSString(string:s).doubleValue | |
s⟹.doubleValue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment