How to change bottom layout constraint in iOS, Swift

前端 未结 3 2106
深忆病人
深忆病人 2020-12-25 14:39

I have scroll view as @IBOutlet

@IBOutlet weak var mainScrollView: UIScrollView!

I want to change the

\"Bottom space to: B         


        
3条回答
  •  旧时难觅i
    2020-12-25 15:17

    Take the constraint as IBOutlet of NSLayoutConstraint.

    enter image description here

    Set the constraint outlets and change constant value by :

    self.sampleConstraint.constant = 20
    self.view.layoutIfNeeded()
    

提交回复
热议问题