I have my view controller and xib file. In the xib file, on the main view I have a subview. The subview contains a scrollview above a button. The scrollview’s content view contains a text label and text view. The strings for the text label and text view are being sourced from a strings file. The second text for the text view may be sourced from one of several files and tends to have larger text but it varies. The text view is not scrollable. The button has it’s height fixed.
What I want – The UIView containing the scroll view and button needs to grow or shrink based on the content of the scroll view, but the UIView containing everything also shouldn’t grow bigger than the top and bottom constraints of the device screen. The scroll view should minimize its size to the size of the content view if possible. If the size of the two text labels (due to their string sizes) is large enough, then the scroll view should grow to match that size based on it’s content view up to the size fitting in the UIView containing it and the button. Once the UIView containing the scroll view and the button has reached it’s maximum size, the button should still be fixed at the bottom and the scroll view should take up the rest of the screen and at that point, it should become scrollable if the text is larger still.
I can do this programmatically. That’s not much of an issue. I’m wanting to do this entirely through the xib and the interface builder and I’m not sure how to approach this with the constraint options given there. I’ve spent about 6 hours trying different things and I’m just not getting it. Any help?