Objective-C 空Block用法

来源:互联网 发布:linux设置硬件时间 编辑:程序博客网 时间:2024/06/05 22:52

内容如下:


@interface Demo (){    void(^firstBlock)(); //局部变量}@end//回调的block^(void){        NSLog(@"---------------------------0");}typedef void (^Block)();  //定义block类型//代码里的block变量void(^firstBlock)() = ^(void) {}+ (NSDictionary *)dictWithTitle:(NSString *)title sel:(void(^)())sel; //函数里的代码块


0 0