I would like to implement only zoom in feature on uiscrollview in iphone sdk.Is it possible to do this?
I am using bellow code
{
scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 700, 510)];
scrollView.delegate = self;
scrollView.ScrollEnabled=YES;
scrollView.contentSize = CGSizeMake(700, 510);
scrollView.userInteractionEnabled = FALSE;
scrollView.clipsToBounds = YES;
scrollView.minimumZoomScale = 1;
scrollView.maximumZoomScale = 2;
[scrollView addSubview:portrateSlideImage];
[portSlideContainer addSubview:scrollView];
}
And using uiscrollview delagte
-(UIView *) viewForZoomingInScrollView:(UIScrollView *)scrollView {
return portrateSlideImage;
}
Try this. May be this would help you.
Remove the line from the code where you are setting maximum scale of scroll view
And add this function
It won’t allow you to
zoom out. Just zoom in