title: Objective-C: too many arguments to method call expected 1 have 2 error
body: <p>Below is my code, suppost I want to get the image from web and save it inside my device, but the error occur that I cant solve, please help.</p>
  
  <pre><code>for ( int i=1; i&lt;=numberOfSlides; i++) {
      NSString *picURLstring = [NSString stringWithFormat:@"http://example.com/Slide%d.jpg", i] ;
      NSURL *picURL = [NSURL URLWithString:picURLstring] ;
      UIImage *Slide = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:picURL]];
  
      NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES);
      NSString *docPostion = [path objectAtIndex:0] ;
      docPostion = [docPostion stringByAppendingPathComponent:@"Slide%d.png",i];
  }
  </code></pre>
  
  <p>The error happen it the line:</p>
  
  <pre><code>docPostion = [docPostion stringByAppendingPathComponent:@"Slide%d.png",i];
  </code></pre>
  
  <p>I want to save the image into the name according to the variable i, I guaranty that this code is right in C language, but now in objective-c I dont know why I cant do so.</p>