Reputation: 753
I have a view in my storyboard
with some items, 1 of which is a UITextView
. Whenever I enable scrolling (either by inspector or via code), the UITextView
disappears/becomes invisible/whatever. Is there a way to make this not happen?
Thanks in advance
Upvotes: 4
Views: 1049
Reputation: 7764
The height of UITextView
is probably not set. When scrolling is disabled, the UITextView
's size is calculated based on it's content (because the content has to fit, because if it doesn't, user can't scroll to see it). On the other hand, when the scrolling is enabled, the system presumes, that even if the content doesn't fit, user can scoll down to see it all. And since the UITextView
height is not set by you, and neither it is set "by the content", the UITextView
height is 0
.
Upvotes: 2