1

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?

1 Answer 1

2

When the user edits your UITextView field, get its bounds height and recalculate the overall size of you scrollable view, then set UIScrollView's contentSize property.

You can detect the end of editing on a UITextView object by means of its UITextViewDelegate textViewDidEndEditing: method.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.