scrollview and textview problem with scrolling iphone
i have a view, then in the view i have a scrollview and then in the scrollview i have a bunch of different objects. These objects aren't bigger than the scrollview's size, so i put a textView with a lot of text in the scrollview to see if it works but it is not scrolling. I deactivated the textview's scroll function. Does t开发者_运维百科he scrollview knows the size of my textview? The textview's text is being set programmatically. Here's my view hierarchy:
Thanks in advance.
If you set the text programatically (and the size of the textview I assume since you don't scroll in it) you will have to set the contentSize of the scrollview after that. It doesn't automagically know when one of its elements grow.
And also set
scrollView.scrollEnabled = YES;
精彩评论