I want my image called bildfraga to be zoomable. It is placed in the scrollview called scroll. I am able to scroll the picture, but not zoom it.
在图像显示时,这是我的代码:
bildfraga = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"dtk2.png"]];
scroll.contentSize = bildfraga.frame.size;
[scroll addSubview:bildfraga];
scroll.minimumZoomScale = 0.4;
scroll.maximumZoomScale = 4.0;
[scroll setZoomScale:scroll.minimumZoomScale];
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scroll{
return bildfraga;
}
但是,当我试图建立这一关系时,我就犯了一个错误,说“使用未经申报的识别观点,ForZoomingInScrollView”。
提前感谢!
页: 1