views:

6

answers:

0

Hi friends...

I m scrolling a image using this code-

(id)initWithImage:(UIImage *)productImage {
    if (self = [super init]) {
        // Custom initialization

  imageView=[[UIImageView alloc]initWithFrame:CGRectMake(70, 55, 200, 200)];
  [imageView  setImage:productImage];

  scrollView=[[UIScrollView alloc]init];
  scrollView.frame=CGRectMake(0, 0, 320, 480);
  scrollView.contentSize=CGSizeMake(320,500);  
  scrollView.maximumZoomScale=4.0;
  scrollView.minimumZoomScale=0.75;
  scrollView.clipsToBounds=YES;
  scrollView.delegate=self;
  [self.view addSubview:scrollView];    
  [scrollView addSubview:imageView];

 }
    return self;
}

(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
 return imageView;

}

Now i want that when i make double click on the image this image will return to it's original size.
Any help/suggetion ......some code will be useful to me. Thanks for any help.