title: Zooming in UIScrollView not working
body: <p>can someone help me on doing zooming with the UIScrollView?</p>
  
  <p>I am trying to add the three images retrieved from an URL and display it using a UIScrollView. I can do the display part but the zooming is not working. I hope someone can show me some lights.</p>
  
  <p>My .h file</p>
  
  <pre><code>@interface TestScrollViewViewController : UIViewController &lt;UIScrollViewDelegate&gt;{
  
  IBOutlet UIScrollView *scrollView;
  UIImageView *subview;
  
  }
  
  @property (nonatomic, retain) UIScrollView *scrollView;
  @property (nonatomic, retain) UIImageView *subview;
  
  @end
  </code></pre>
  
  <p>the .m file</p>
  
  <pre><code>- (void)viewDidLoad {
    [super viewDidLoad];
  
      UIImage *page1 = [[UIImage alloc] initWithData:[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://abc.com/001.jpg"]]];
      UIImage *page2 = [[UIImage alloc] initWithData:[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://abc.com/002.jpg"]]];
      UIImage *page3 = [[UIImage alloc] initWithData:[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://abc.com/003.jpg"]]];
  
  
      NSArray *images = [NSArray arrayWithObjects: page1, page2, page3, 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;
  
      subview = [[UIImageView alloc] initWithFrame:frame];
      subview.image = [images objectAtIndex:i];
  
      self.scrollView.minimumZoomScale=0.5;
      self.scrollView.maximumZoomScale=6.0;
      self.scrollView.delegate=self;
  
      [self.scrollView addSubview:subview];   
  
      [subview release];
  }
  
  self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * images.count, self.scrollView.frame.size.height);
  
  }
  </code></pre>
  
  <p>and this is the viewForZoomingInScrollView method</p>
  
  <pre><code>- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
  {
      return self.scrollView;
  }
  </code></pre>
  
  <p>Really hope someones can help. Thanks.</p>
  
  <p>Lawrence</p>