(iOS)
I have a view that contains multiple textviews under static headings (see image below). The text of the textviews will change dependent on the previous view. I am having trouble getting Heading 2 and its textview to layout beneath heading 1 and its text view (this is all contained within a scrollview). Any ideas on a good way to ensure that these textviews layout appropriately? I want the textviews to be able to wrap height, moving all views “below” it further down the view. (Note: I have tried, via google-fu, a number of different methods involving things along the lines of the following without much success:
CGRect frame = _textView.frame;
frame.size.height = _textView.contentSize.height;
_textView.frame = frame;
_scrollView.contentSize = CGSizeMake(frame.size.width, 10+CGRectGetMaxY(frame));
)
Goal:

Bad Layout using above code:

Not much to go on, but it looks like you may not have “moved” the second label and text view down to compensate for the now larger upper text view. Try changing the frame of the lower label and text view so that the Y value places them down far enough to clear the upper text view.