Being a novice at Objective-C, I don't get quite the notion of delegate yet. I looked around, but I could not understand the answers being given, so I'm asking this with my own words.
I have implemented a DownloadDelegate with those four functions:
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
Problem is, I want to send and retrieve data after it's been downloaded. I used to be able to do so when those methods were in my appviewcontroller, but since I want to call the download process many times I figured I should put it into a delegate (is that even true?)
But I don't know how to send and retrieve data to a delegate. By the way I used the apple tutorial to establish the NSURLConnection in the first place and it worked just fine. Link
Thanks for any help!