开发者

uiimage of uiimageview doesn't update before NSURLConnection sendSynchronousRequest (iphone)

开发者 https://www.devze.com 2022-12-31 08:59 出处:网络
I\'m replacing an uiimage of uiimageviewbefore calling NSURLConnection sendSynchronousRequest, an as a re开发者_高级运维sult i don\'t see the new uiimage.

I'm replacing an uiimage of uiimageview before calling NSURLConnection sendSynchronousRequest, an as a re开发者_高级运维sult i don't see the new uiimage.

How i can resolve this?

tnx


Let the UI update happen (from the run loop) before sending your synchronous request. Use NSObject's performSelector:withObject:afterDelay: to schedule a method after a (zero) delay. In the method you specify in the selector argument you would send the request.


Make an asynchronous request or move the synchronous request into a separate thread. You can use performSelectorInBackground:withObject: for simple cases.

0

精彩评论

暂无评论...
验证码 换一张
取 消