Created
September 1, 2012 03:42
-
-
Save mtmcfarl/3563427 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)connectionDidFinishLoading:(NSURLConnection *)connection { | |
// Once this method is invoked, "responseData" contains the complete result | |
NSLog(@"Succeeded! Received %d bytes of data", [receivedData length]); | |
NSString *dataStr=[[NSString alloc] initWithData:receivedData encoding:NSASCIIStringEncoding]; | |
NSLog(@"Succeeded! Received %@ bytes of data", dataStr); | |
if ([delegate respondsToSelector:@selector(didFinishDownload:)]) { | |
NSLog(@"Calling the delegate"); | |
//NSString* dataAsString = [[[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding] autorelease]; | |
[delegate performSelector:@selector(didFinishDownload:) withObject: dataStr]; | |
} | |
[dataStr release]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment