This is more of a design question. I have a single ViewController which manages a UITableView. The user can add/edit/delete items in this tableview. Changes to this tableview are persisted in my back end database via web service calls. I am using ASIHTTPRequest to wrap these web service calls. ASIHTTPRequest requests are given a delegate object which should implement -(void)requestFinished:request and -(void)requestFailed:request.
Obviously my implementation of -(void)requestFinished:request will be different depending on whether the user is deleting a record or refreshing the tableview. How is this typically handled? Should I implement a unique delegate for different types of requests, set ‘status’flags in the view controller to indicate which request is in progress or something else?
Thanks!
You should follow documentation of ASIHTTPRequest
Handling success and failure for multiple requests in delegate methods
http://allseeing-i.com/ASIHTTPRequest/How-to-use
Hope this will help you out.