Reputation: 33
I have a simple UIScrollView
. I initialise it this way :
self.scrollView.contentSize=CGSizeMake(500, 200);
//[self.scrollView setContentSize:CGSizeMake(320,770)];
[self.scrollView setBackgroundColor:[UIColor greenColor]];
But when I put a button in it, it wont scroll anymore!
Thanks for helping me !
Upvotes: 0
Views: 65
Reputation: 2050
What you have to do is make the (500, 200);
into something bigger than the dimensions of the screen. (500, 200);
means the scroll view is 500 x 200 pixels which is smaller than an iPhones screen dimensions. you need to increase those numbers beyond the screen sise of the device you're testing on.
use this link for screen sizing guidelines.
Upvotes: 1