This is the code that I use when setting up a UIScrollView to contain multiple images that can be scrolled through. I add this code in the viewDidLoad or viewWillAppear methods and then set the numberOfViews to the number of images I want to display. This will also scale the images to fit the size of the screen using an aspect fit scaling. The example code loads images named “image1”, “image2” etc.

    -(void) setupScrollView {
        //add the scrollview to the view
       self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0,
       self.scrollView.pagingEnabled = YES;
       [self.scrollView setAlwaysBounceVertical:NO];
        //setup internal views
       NSInteger numberOfViews = 3;
       for (int i = 0; i < numberOfViews; i++) {
          CGFloat xOrigin = i * self.view.frame.size.width;
          UIImageView *image = [[UIImageView alloc] initWithFrame:
                                                    CGRectMake(xOrigin, 0,
          image.image = [UIImage imageNamed:[NSString stringWithFormat:
                                            @"image%d", i+1]];
          image.contentMode = UIViewContentModeScaleAspectFit;
          [self.scrollView addSubview:image];
        //set the scroll view content size
       self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width *
        //add the scrollview to this view
       [self.view addSubview:self.scrollView];