标签:blog 使用 io for ar div cti log sp
typedef void (^ simpleBlock) (void); typedef double (^multiplyTwoValues)(double, double); typedef void (^ simpleTestBlock) (int ,int); @implementation TJAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. simpleBlock block =^{ NSLog(@"this is a block"); }; block(); multiplyTwoValues values=^(double x,double y) { return x *y; }; NSLog(@"%.3f",values(2.0,3.0)); simpleTestBlock testBlock=^(int x,int y) { NSLog(@"--->%d",x+y); }; testBlock(2,3); return YES; }
标签:blog 使用 io for ar div cti log sp
原文地址:http://www.cnblogs.com/thbbsky/p/3933435.html