views:

368

answers:

2

I have a UIScrollView which contains many UIImageView's UILabel's etc... the labels are well longer that the UIScrollView, but when I run the app, I cannot click and scroll down...

Why might this be?

Thanks

+1  A: 

Make sure you have the contentSize property of the scroll view set to the correct size (ie, one large enough to encompass all your content.)

Ben Gottlieb
do I have to do this programatically? or can I do it in IB?
Mark
+1  A: 

It's always good to show a complete working code snippet:

// in viewDidLoad:
//
UIScrollview *myScrollView;
UIView_descendent *contentView;
...
// scrollview won't scroll unless content size explicitly set
//
[myScrollView setContentSize:CGSizeMake( contentView.frame.size.width,
                                         contentView.frame.size.height ) ];

I have not found a way to set contentSize in IB.

Bogatyr