UIScrollView Not Scrolling When UIView Subclass Added

Posted by Tres Tue, 05 May 2009 03:45:00 GMT

So UIScrollView doesn’t take care of seeing how large the objects in it are. To make sure UIScrollView scrolls when adding to a view / views that are in the UIScrollView, you need to tell it how big the content is. You can do that with setContentSize: like this:

[scrollView setContentSize:CGSizeMake(myUIViewObject.frame.size.width,
    myUIViewObject.frame.size.height+140)];

Posted in ,  | Tags

Comments are disabled