答案 0 :(得分:0)
覆盖viewcontroller中的updateConstraint方法
override func updateConstraints() {
//do something here with the constraint
self.yourconstraint.constant = ?
//or you can inactive a constraint
NSLayoutConstraint.activateConstraints([yourConstraint])
//then you can put logic here : where your screen size 320
if (Screen.size.width == 320) {
//update your constraint
}
super.updateContraint()
}