title: How do I download an image from a URL and save it to my computer?
body: <p>How would I download an image from a URL, and have that saved to the computer using Objective-C? This is what I got so far:</p>
  
  <pre><code>NSString *documentsDirectoryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
  
  UIImage *imageFromURL = [self getImageFromURL:@"https://www.google.com/images/srpr/logo11w.png"];
  
  [self saveImage:imageFromURL withFileName:@"Google Logo" ofType:@"png" inDirectory:documentsDirectoryPath];
  
  UIImage *imageFromWeb = [self loadImage:@"Google Logo" ofType:@"png" inDirectory:documentsDirectoryPath];
  </code></pre>
  
  <p>Xcode complains about UIIMage, trying to replace with NSImage. It also complains about an undeclared identifier 'self'.</p>
  
  <p>I need to make an HTTP call to perform this as well. Explain this to me like I'm 5.</p>