使用 snapkit,我得到了下面的图像。文本视图正在弹出视图上方,“列表名称”弹出标题在文本视图上方 10 像素以上。怎么修?
代码
private func makePopUpTitle() {
popUpTitle.text = "List Name"
popUpView.addSubview(popUpTitle)
popUpTitle.snp.makeConstraints { (make) -> Void in
make.centerX.equalTo(popUpView)
make.top.equalTo(popUpView).offset(20)
}
}
private func makeListNameTextView() {
self.automaticallyAdjustsScrollViewInsets = false
popUpView.addSubview(nameTextView)
nameTextView.snp.makeConstraints { (make) -> Void in
make.left.equalTo(popUpView).offset(20)
make.right.greaterThanOrEqualTo(popUpView).offset(20)
make.top.equalTo(popUpTitle.snp.bottom).offset(10)
make.width.lessThanOrEqualTo(popUpView.snp.width)
make.height.equalTo(35)
make.centerY.equalTo(popUpView)
}
}