I am trying to get a simple scroll view to work with autolayout. My SuperView has a Scroll View. Inside the Scroll View is a ContentView and then a ButtonsView.
View (320x480)
|
|__Scroll View(320x480)
|
|__ContentView(320x556)
|
|__ButtonsView(320x175)
The ScrollView constraints to the SuperView are 0,0,0,0 for Leading, Trailing, Bottom and Top. The ContentView constraints to the Scroll View are 0,0,-96,0 for Leading, Trailing, Bottom and Top. The -96 is because my content view height is 556. I have a ButtonsView inside the ContentView. The ButtonView constraints to the ContentView are 0,0,238,64.35 for Leading, Trailing, Top and Aspect Ratio.
I am getting Missing Constraints and Scrollable Content Size Ambiguity errors on my xib.
I do not want to to hardcode the width and height for either my ContentView or ButtonsView as I want the xib to work for iPad as well.
Can someone please tell me what I am doing wrong and how I can get this fixed?
Thanks
This is not a duplicate question. The question above has a scrollview which doesnt work as intended. My question is more about how autolayout rules can be applied to the scrollviews.