开发者

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:

scrollview and textview problem with scrolling iphone

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜