views:

142

answers:

2

I have a pretty simple UIScrollView defined inside Interface Builder. I've pasted in some UILabels and when I run my app, I can drag to see the UILabels at the bottom but as soon as I let go it bounces away from view.

What property controls this sort of setting?

+2  A: 

The contentSize property should do the trick. Don't forget about the docs.

Ian Henry
Yeah I have that. It seems to be ignoring the values I set. I know my scroll view outlet is correctly hooked up but whether I do scrollView.contentSize = CGSizeMake(320, 1000) or (320,10) it doesn't seem to change the behavior.
Travis
+1  A: 

For the bounce effect there is a bounces property for UIScrollView which controls this...

http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html#//apple_ref/occ/instp/UIScrollView/bounces

And has been mentioned by Ian Henry contentSize should control the size of your scrollable area.

Rob Segal
Yeah I'm working with those. The bouncing is fine (I like it), but it's like when I hold the scroll I can see the last few lines, when I let go, it bounces out of visibility. Ideally it would still be visible.
Travis
Scratch that. I got it fixed. I was manipulating the wrong scrollview. Thanks.
Travis
Great glad you got thinks fixed.
Rob Segal