Created
November 25, 2012 17:28
-
-
Save romyilano/4144448 to your computer and use it in GitHub Desktop.
blockExample - from Shawn Welch
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
// 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