2

我有一个 UIScrollView 并且我将框架大小设置为小于内容大小,但它仍然不会滚动。我试过在这里搜索很多问题,但每次通常都是这个人没有设置 -(void)setContentSize:(CGSize)size。我也在 -(void)viewDidLoad 上调用它,所以不确定我做错了什么。这是我的代码:

self.theScrollView.clipsToBounds = YES;
self.theScrollView.scrollEnabled = YES;
self.theScrollView.frame = CGRectMake(0,19,320,434);
self.theScrollView.contentSize = CGSizeMake(322, 900);

有什么帮助吗?谢谢。

4

0 回答 0