参考:http://www.tekuba.net/program/271/
最近开发项目用ASIFormDateRequest异步访问完网络后,在completionBlock里调用了UIAlertView的show函数,但却发现很久才出现弹框,原来是因为没有在主线程中调用,解决方法如下:
[alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:YES];
参考:http://www.tekuba.net/program/271/
最近开发项目用ASIFormDateRequest异步访问完网络后,在completionBlock里调用了UIAlertView的show函数,但却发现很久才出现弹框,原来是因为没有在主线程中调用,解决方法如下:
[alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:YES];