我在ScrollView
中有一个ImageView
,并在某个时间调整了ScrollView
的大小。问题是,ImageView
调整为与ScrollView
相同的大小,但我希望它保持原始图像大小。Scrollview中的图像大小调整
我在做什么,这是:
scrollView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); // fullscreen scrollview
[scrollView setContentMode:UIViewContentModeTopLeft]; //i want the content to be on the top left, thats correct right?
[scrollView setContentSize:CGSizeMake(imageInScrollView.frame.size.width, imageInScrollView.frame.size.height)]; // now im setting the size of the content, which is like 200x200 but it shows in fullscreen
请阅读我旁边的代码中的注释,谢谢!
加入这一行我的代码,但它什么也没做 – oybcs 2012-07-24 09:19:35