`

UIAlertView调用show后很久才弹出来的原因

阅读更多

参考:http://www.tekuba.net/program/271/

 

最近开发项目用ASIFormDateRequest异步访问完网络后,在completionBlock里调用了UIAlertView的show函数,但却发现很久才出现弹框,原来是因为没有在主线程中调用,解决方法如下:

 

[alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:YES];

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics