0
我有一個UIViewController
子下面viewDidLoad
方法實現:無法設置滾動視圖與PureLayout
var scrollView = UIScrollView.newAutoLayoutView()
var contentView = UIView.newAutoLayoutView()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(scrollView)
scrollView.autoPinEdgesToSuperviewEdgesWithInsets(UIEdgeInsetsZero)
scrollView.addSubview(contentView)
contentView.autoPinEdgesToSuperviewEdgesWithInsets(UIEdgeInsetsZero)
contentView.autoMatchDimension(.Height, toDimension: .Height, ofView: view)
contentView.autoMatchDimension(.Width, toDimension: .Width, ofView: view)
contentView.addSubview(customView)
customView.autoPinEdgeToSuperviewEdge(.Top, withInset:0)
customView.autoPinEdgeToSuperviewEdge(.Left, withInset:15)
}
,但內容當我運行的應用程序不滾動。我發現幾個PureLayout文檔和示例,並沒有關於滾動視圖的清楚。有人能幫助我嗎?