Skip to content

Instantly share code, notes, and snippets.

@mogeta
Created May 14, 2012 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mogeta/2692588 to your computer and use it in GitHub Desktop.
Save mogeta/2692588 to your computer and use it in GitHub Desktop.
easy miss
NSURLResponse* response=nil;// not =nil;
NSError* error;
NSURL* url = [NSURL URLWithString:@"http://hogehoge"];
NSURLRequest* request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendSynchronousRequest:req returningResponse:&response error:&error];
NSLog(@"%@",response);// <null>
@mogeta
Copy link
Author

mogeta commented May 14, 2012

イージーミス。
NSURLResponse にnil入れといたらそらそうなるわ。というお話。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment