I created a demo project here. I have a view where I created a ScrollView in a .xib file. In interface builder I did not set any constraints. In my viewDidLoad method I set
How can I prevent Interface Builder from auto generating constraints?
Simplest way: select the nib or storyboard in the project navigator, go to the File inspector, and uncheck "Use Auto Layout".