【文件属性】:
文件名称:Async:Objective-C中的语法糖,用于Grand Central Dispatch中的异步调度
文件大小:365KB
文件格式:ZIP
更新时间:2021-05-09 07:22:36
Objective-C
异步的
Objective-C中的语法糖,用于Grand Central Dispatch( )中的异步调度
注意:这是Swift中的 。
异步糖看起来像这样:
[[Async main: ^{
NSLog ( @" ===>>> This is run on the main queue " );
}] background: ^{
NSLog ( @" ===>>> This is run on the background queue " );
}];
代替熟悉的GCD语法:
dispatch_async (dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0 ), {
NSLog ( @" ===>>> This is run on the b