I have a scrollView with a UIView as subview, which in turn has many subviews, one of which is a textView with variable height. This is the hierarchy of views:
-UIScrollView
- UIView
-UITextView with variable height
-UImages
As can dynamically vary the height of the UIView and finally the scrollView based on the length of the content?
When the user edits your
UITextViewfield, get its bounds height and recalculate the overall size of you scrollable view, then setUIScrollView‘scontentSizeproperty.You can detect the end of editing on a
UITextViewobject by means of itsUITextViewDelegatetextViewDidEndEditing:method.