title: Scrolling of Images using UIScrollView and ImageView in iPhone
body: <p>I am working one of the app, In that app,there is only one view that has an image on it. I want to be able to swipe left or right and have the first image go out of the view and the second image to come in. The images are different and I want it to look like they are connected. I have used UIScrollView and UIImageView on xib files below is my code which i am using in view did load method. When i run the app, only last image is showing in scrollview.</p>
  
  <pre><code>NSMutableArray *images = [[NSMutableArray alloc] initWithObjects:[UIImage imageNamed:@"iPad.png"],[UIImage imageNamed:@"iPadMini.png"],[UIImage imageNamed:@"iPhone4.png"],[UIImage imageNamed:@"iPhone5.png"], nil];
  for (int i = 0; i &lt; [images count]; i++) {
      CGRect frame;
      frame.origin.x = self.scrollView.frame.size.width * i;
      frame.origin.y = 0;
      frame.size = self.scrollView.frame.size;
      imgView.frame = frame;
      imgView.image = [images objectAtIndex:i];
      [scrollView addSubview:imgView];
  }
  self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * images.count, self.scrollView.frame.size.height);    
  </code></pre>