我想只在 iphone sdk 的 uiscrollview 上实现放大功能。可以这样做吗?
我正在使用下面的代码
{
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];
}
并使用 uiscrollview delagte
-(UIView *) viewForZoomingInScrollView:(UIScrollView *)scrollView {
return portrateSlideImage;
}