A. First set static constraint of a view like - Button, Image, UIView etc.
1. Select a constraint (Leading, Top, Trailing, Bottom) and drag to View Controller IBOutlet
Code - @IBOutlet weak var leadingConstraint: NSLayoutConstraint!
2. Constraint :
Code - leadingConstraint.constant = 100
3. Check constraint available
Code - leadingConstraint.isActive
4.
22
No comments:
Post a Comment