Objective-C asynchronous callback from
I am trying to create a class that handles some NSURLConnection and authentication elements and then makes a callback for the download. Ends when it has completed the didReceiveData event. How exactly does this work in Objective-C? Thank you!
#import "fetch.h"
...
- (IBAction)downloadButton {
fetch *downloader = [[fetch alloc] init];
[downloader setAuth:Username.text password:Password.text saveName:@"test.txt"];
[downloader download:@"http://google.com"];
}
-(void)downloadFinished:(NSString *)fileName
{
...
}
+1
David
a source
to share