title: Scrollview paging with images?! xCode 4.2
body: <p>I've been searching for long time how to add images into a scrollview and enable paging, so when i swipe left or right the next or previus images shows. i havent find anything that works yet, the only thing i found was this </p>
  
  <p>Code below:</p>
  
  <pre><code>    - (void)viewDidLoad
  {
      [super viewDidLoad];
      NSArray *colors = [NSArray arrayWithObjects:[UIColor orangeColor], [UIColor greenColor], [UIColor blueColor],[UIColor   redColor], nil];
      for (int i = 0; i &lt; colors.count; i++) {
          CGRect frame;
          frame.origin.x = self.scrollView.frame.size.width * i;
          frame.origin.y = 0;
          frame.size = self.scrollView.frame.size;
  
          UIView *subview = [[UIView alloc] initWithFrame:frame];
          subview.backgroundColor = [colors objectAtIndex:i];
          [self.scrollView addSubview:subview];
  
      }
  
      self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * colors.count, self.scrollView.frame.size.height);
  }
  </code></pre>
  
  <p>Ofc this does enable paging but with colors only, i tryed change where the UIColor with [UIImage imageName: @"photo1.jpg"] but it doesnt work at all... </p>
  
  <p>So after searching for a few days i need to ask how to do it, how to have some images inside a scroll view and have paging enabled</p>
  
  <p>Thanks in advance for any help</p>