I have a viewview viewV and would like to change your Width and Height shown in the image below via Swift code.
It would be interesting to use% s of% s for this. It would be via code (more or less) like this:
// Constraints
let topConstraint = NSLayoutConstraint(item: viewV, attribute: .top, relatedBy: .equal, toItem: viewV.superview!, attribute: .top, multiplier: 1, constant: 0)
let leadConstraint = NSLayoutConstraint(item: viewV, attribute: .leading, relatedBy: .equal, toItem: viewV.superview!, attribute: .leading, multiplier: 1, constant: 0)
let widthConstraint = NSLayoutConstraint(item: viewV, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 0.0, constant: 667)
let heightConstraint = NSLayoutConstraint(item: viewV, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 0.0, constant: 267)
NSLayoutConstraint.activate([topConstraint, leadConstraint, widthConstraint, heightConstraint])