关于自动布局scrollview 并使其滚动(snapkit)
scrollView = UIScrollView.init()
view.addSubview(scrollView!)
scrollView?.snp.makeConstraints({ (make) in
make.edges.equalToSuperview()
})
scrollBackView = UIView.init()
scrollView?.addSubview(scrollBackView!)
scrollBackView?.snp.makeConstraints({ (make) in
make.edges.equalToSuperview()
make.width.equalTo(kScreenWidth)
make.height.greaterThanOrEqualTo(scrollView!).offset(1)
})
contentLabel = UILabel.quickInitLable(text: "", font: 15, textColor: "#333333")
contentLabel?.numberOfLines = 0
scrollBackView?.addSubview(contentLabel!)
contentLabel?.snp.makeConstraints({ (make) in
make.top.equalTo(lineView!.snp.bottom).offset(10)
make.left.right.equalTo(titleLabel!)
make.bottom.lessThanOrEqualTo(scrollBackView!.snp.bottom).offset(-10)
})