So I wanna use a scrollview, while also fitting the width of it to the screen size of each device automatically.
So on iPhone 6+, and on iPhone 5 the inner UIView that is within the UIScrollView would fill the width of the UISCrollView. The constraints of the objects within the UIView and the UIView should reposition the inner content to fit the actual final width.
The problem I am having is that I know how to make the UIScrollView to fit the screen it is being hosted in, and I know how to create the constraints of the objects within the UIView to the UIView itself, and these all seem to work.
BUT - I couldn't find out how to make the UIView that contains the content to change its width to fit the UIScrollView.
Setting constraints do not help between the scrollView and the UIView which is the immediate kid. I think this because of the "content" vs. "frame" discussion they have on Apple web-site"
Changing the frame parameters in code is being ignored (probably because it is part of an AutoLayout storyboard):
var currSize = contentView.frame;
currSize.size.width = UIScreen.mainScreen().bounds.width;
contentView.frame = currSize;
I do want to have Autolayout within the inner UIView as described above,
I do want the UIScrollView to fit the whole screen.
What should I do??
-> I want to configure the "View" to fit the size of the "ScrollView" which it is in, but any AutoLayout constraint is being wrong to configure (since it does not apply on the content size) and code is being ignored because of auto layout.
These are the objects and constraints: