Web Service Calls with Delegation
Anybody needing a snippet to asynchronously call a web service without freezing the app, its below. It may or may not be the right way to do it, but I’ve standardized on it for my own use.
The “gist” if what is going on below is:
1. Provide a user action to fire off the web service call, in the class a button click. This builds a delegate instance.
2. Provide a method to begin invocation, this is the call itself, this is the beef of the web service call.
3. Setup a landing spot for the call, FinishResult. In here I do the activity indicators and what not that the call is complete, but I pass any of the results from the call to the Result Step.
4. The ResultStep has the result back which can be used throughout the app.
Enjoy.









