Hey guys. so I have this UIScrollView inside another UIView without occupying the entire area (all this is initialized via the nib file). I added some content to the scroll view, but whenever I scroll it, the content area of ββthe UIScrollView moves out of the scope of the ScrollView above the area of ββthe UIView not intended to display it.
Doesn't he stay inside his frame, even when I scroll through it?
Thanks for helping me.
Perhaps the property of clipsToBoundsyour UIScrollView is set to NO. Check the setting in IB, or you can set it in code as follows:
clipsToBounds
scrollView.clipsToBounds = YES;
, UIScrollView , , , . - , ?
ClipToBounds YES, , :
yourViewController.clipsToBounds = YES;
... fbreto , ...
Make sure you have setContentSize installed. And also set the size of the uiviews frame inside the uiscrollview correctly when you add them.
Here is a sample code http://developer.apple.com/library/ios/#samplecode/Scrolling/Introduction/Intro.html