Guest User

Untitled

a guest
Dec 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
  2. // Once this method is invoked, "responseData" contains the complete result
  3. NSLog(@"Succeeded! Received %d bytes of data", [receivedData length]);
  4.  
  5. NSString *dataStr=[[NSString alloc] initWithData:receivedData encoding:NSASCIIStringEncoding];
  6. NSLog(@"Succeeded! Received %@ bytes of data", dataStr);
  7.  
  8. if ([delegate respondsToSelector:@selector(didFinishDownload:)]) {
  9. NSLog(@"Calling the delegate");
  10. //NSString* dataAsString = [[[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding] autorelease];
  11. [delegate performSelector:@selector(didFinishDownload:) withObject: dataStr];
  12. }
  13.  
  14. [dataStr release];
  15. }
Add Comment
Please, Sign In to add comment