我有一个ImageView
in aScrollView
并ScrollView
在某个时候调整大小。问题是,ImageView
正在调整大小与 相同的大小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
请阅读我的代码旁边的注释,谢谢!