UIScrollView和自动布局问题

时间:2014-08-20 13:22:28

标签: ios uiscrollview autolayout

好的,我使用下面的代码来设置大内容:

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    self.theScrollView.contentSize = CGSizeMake(self.view.frame.size.width, 10000);
}

我也使用自动布局。所以我的滚动视图的UIView配置如下:

enter image description here

enter image description here

因此,这意味着在旋转屏幕后,UIView将直接位于视图中心。

仅供参考:我的滚动视图在屏幕上伸展:

enter image description here

但我有另一个问题,因为自动布局我的内容大小现在可以正常工作。

0 个答案:

没有答案