Last active
August 29, 2015 14:20
-
-
Save drumnkyle/c2fd8d7c58380e0a91a4 to your computer and use it in GitHub Desktop.
Swift/ObjC Blocks
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
// Objective-C | |
BOOL (^completion) (NSError *, NSDictionary *) = ^BOOL(NSError *error, NSDictionary *data) { | |
// code here | |
return YES; | |
} | |
// Swift | |
let completion: (NSError, [String : AnyObject]) -> Bool = { error, data in | |
// code here | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment