Initial setup constraints code shouldn't be written in "updateConstraints" method
Hi,
According to the Apple Developer Document
In general, you can make these changes at any time. Ideally, most constraints should be set up in Interface Builder, or programatically created by the view controller during the controller’s initial setup (for example, in viewDidLoad). If you need to dynamically change constraints at runtime, it’s usually best to change them when the application’s state changes. For example, if you want to change a constraint in response to a button tap, make that change directly in the button’s action method.
Apple's recommended most constraints should be set up in Interface Builder or during the controller’s initial setup (for example, in viewDidLoad).
But you suggest writing the "adding" code in the updateConstraints method which will add (include initial setup constraints) constraints to UIView

So there should be modified?