UIScrollView with iOS Auto Layout Constraints: Wrong size for subviews
I'm trying to generate a view in code. Here's the hierachy of my view object UIScrollView UIView UIButton The ScrollView should be the same size as the window. The button should be as big as possible. I'm using iOS auto layout, so the constraint strings for all of my objects look like this H:|[object]| V:|[object]| I've also set translatesAutoresizingMaskIntoConstraints to NO for each object. The problem is that the button only gets the default button-size. Its parent view object (UIView) only gets the size its subviews need. red: UIScrollView / yellow: UIView How can I force those views to be