Skip to content

Instantly share code, notes, and snippets.

@romyilano
Created November 25, 2012 17:28
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 romyilano/4144448 to your computer and use it in GitHub Desktop.
Save romyilano/4144448 to your computer and use it in GitHub Desktop.
blockExample - from Shawn Welch
// simple demo of a block
// create a new NSString variable demo storing the value hello
NSString *demo = @"Hello";
// define a block with function name helloBlock
void(^helloBlock)(NSString*) = ^(NSString *param) {
NSLog(@"%@,%@", demo, param);
};
helloBlock(@"Block");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment