【发布时间】:2013-02-10 03:49:38
【问题描述】:
好的,所以我在 UIScrollView 中有一个 UIImageView。我将图像动态加载到 UIImageView 中,然后手动调整它的大小。到现在为止还挺好。但是,如果我触摸 UIScroll 滚动视图(包含调整大小的元素),一切都会调整回原始大小。以防万一,这是调整图像大小的代码:
/**
* Proportionally resize and position doodle
*/
- (void)resizeDoodle:(CGFloat)height {
self.doodleImageView.frame = CGRectMake(0, 0, self.view.bounds.size.width, height);
[self.scrollView setContentSize:self.doodleImageView.frame.size];
}
【问题讨论】:
标签: objective-c uiscrollview uiimageview