I have scroll view as @IBOutlet
@IBOutlet weak var mainScrollView: UIScrollView!
I want to change the
\"Bottom space to: B
Create an IBOutlet for your constraint:
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomContraint;
And when you need to change it call:
bottomContstraint.constant = //your value
view.layoutIfNeeded()
Also you can animate constraint change like that:
bottomContstraint.constant = //your value
UIView.animateWithDuration(0.5, animations: {
self.view.layoutIfNeeded()
})