title: Trying to change image using int
body: <p>I have this code:</p>
  
  <pre><code>  - (IBAction)next {
       static int index = 0;  // &lt;-- here
      index++;
      // Set imageCount to as many images as are available
      int imageCount=16;
      if (index&lt;=imageCount) {
          NSString* imageName=[NSString stringWithFormat:@"img%i", index];
          [picture setImage: [UIImage imageNamed: imageName]];
      }
  }
  </code></pre>
  
  <p>and it is supposed to change the image on the imageview picture but it just changes the imageview to a white background and all my images are named img1 img2 img3 etc how do I make this work?</p>
  
  <p>Please help.</p>
  
  <p>Will</p>