异步走出同步的效果 关键点是利用runloop
从此异步的也可以return了
__block AppDelegate*appDelegate;
dispatch_async(dispatch_get_main_queue(), ^{
CFRunLoopStop(CFRunLoopGetMain());
appDelegate = (AppDelegate*)[[UIApplicationsharedApplication]delegate];
});
CFRunLoopRun();
return appDelegate;
网友评论