Skip to content

Instantly share code, notes, and snippets.

@drumnkyle
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drumnkyle/c2fd8d7c58380e0a91a4 to your computer and use it in GitHub Desktop.
Save drumnkyle/c2fd8d7c58380e0a91a4 to your computer and use it in GitHub Desktop.
Swift/ObjC Blocks
// 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