0

I have a viewController with a textView inside a scrollView in the viewControllers view. The textViews scrollEnabled feature is set to false and I have the textView height resizing as text is entered. This works perfectly until the textView height becomes larger than the viewControllers view height. I have the view height set to freeform and know you can set it to a different height. However, I have other objects int the view and want the view to load with its initial default height and then to resize as the textView height changes and then the user can scroll as that height changes.

Is this possible?

Ryguyu
  • 173
  • 14
  • 1
    A view controller is not a view. It is not an interface object at all. It has no height. What you are saying makes no sense. – matt Apr 28 '15 at 01:22
  • The `view` within the `viewController`.. – Ryguyu Apr 28 '15 at 02:06
  • 1
    The `view` within the view controller - the view controller's main view - has a height that is not up to you. Its height is determined by its place in the view hierarchy when the view controller is placed into the view controller hierarchy. So your question still makes no sense. In fact your whole description of your view-and-view-controller hierarchy makes no sense to me. – matt Apr 28 '15 at 02:08

1 Answers1

0

it's not clear what you are trying to do, but if you want to know more about UITextView an it's delegates, you need to study how UITextView works:

UITextView *textview

It's already a UIScrollView, it inherits from UIScrollView, right? and UIScrollView inherits from UIView.

You need to know that a UITextView is a special view with properties like frame (from UIView), contentOffset and contentSize (from UIScrollView).

And in the inheritance you have all the delegates for UITextView (UITextViewDelegate), for UIScrollView (UIScrollViewDelegate). Inside those delegates you have a lot of methods to determine some of the information you want to know.

But, I don't understand what do you need anyway.

southfox
  • 321
  • 5
  • 16
  • My question was poorly laid out. I found a similar question that explains what I am asking. I will try to figure out from the answers from here. http://stackoverflow.com/questions/16825189/auto-layout-uiscrollview-with-subviews-with-dynamic-heights – Ryguyu Apr 28 '15 at 16:28