1

I am using asihttprequest to load data from a remote database upon loading a particular view controller. Currently there is a lag or so it seems between the user pressing the button to push a new view controller and the view actually appearing...I think this is the time taken to query the database and. retrieve data.

I would like a UIActivityIndicator to appear over the top of the current view between the startSynchronous method call and the triggering of setDidFinishSelector (the method called when response has been given) - i.e. while the data is loading. I know there is documentation in ASI site but I'm struggling to find any example that help to implement what I need...

How is this possible?

user559142
  • 12,279
  • 49
  • 116
  • 179

2 Answers2

0

I'm a little confused why you need help. In your view put up an activity indicator just before you call startSynchronous, and in the didFinishSelector remove that activity indicator (don't forget to also put in a fail callback and remove it there also).

Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
  • Since I did not write your application I have no idea where or how you would put an activity indicator in a view. But that is what must happen. Only you know where the code is that starts the request; only you know where the code is that handles the response. – Kendall Helmstetter Gelner Jul 31 '11 at 01:19
0

Please go through the link which covers ASIHTTPRequest and has source code for UIActivityIndicator along with that....

also go through the stackoverflow link

Community
  • 1
  • 1
DShah
  • 9,768
  • 11
  • 71
  • 127