I want to show activity indicator while sending and receiving synchronous asihttprequest from server. I have used activity indicator as the asihttprequest is send but it did not showing in iPhone due to synchronous request.
Any suggestion how to show activity indicator during synchronous data transfer.
Thanks
I want to show activity indicator while sending and receiving synchronous asihttprequest from server.
Share
Synchronous request calls your activity indicator delegate method
setProgress:on the main thread.B/c you are using
ASIHTTPRequeston the main thread you are blocking the UI, hence calls tosetProgress: are queuing to be dispatched after the request is finished, but by that time the progress is already 100%To solve this use either asynchronous request or call synchronous request on a background thread using
Edit
Remember to create your own autorelease pool to handle the memory inside your startSynchronous: method