【发布时间】:2018-12-01 01:04:55
【问题描述】:
我有一个自定义 UIView,它有一个 UIScrollView 作为子视图。我的问题是当视图调整大小时,我希望调整滚动视图的大小并将其 contentInset 重置为:
scrollView.contentInset = UIEdgeInsets(top: self.bounds.height/2, left: 0, bottom: self.bounds.height/2, right: 0)
如何使用自动布局来做到这一点?
【问题讨论】:
标签: ios uiview uiscrollview autolayout ios-autolayout