开发者

Problem when scrolling ScrollView control?

开发者 https://www.devze.com 2022-12-22 09:22 出处:网络
I have a problem with my UIScrollView. It\'s visible but I can\'t scroll it. CGRect frame = CGRectMake(20, 90,280,1000);

I have a problem with my UIScrollView. It's visible but I can't scroll it.

CGRect frame = CGRectMake(20, 90,280,1000);
scroll1=[[UIScrollView alloc]initWithFrame:frame];
scroll1.contentSize = CGSizeMake(280,1000);
scroll1.backgroundColor=[UIColor grayColor];

//scroll1.delegate=scroll1;
[scroll1 setUserInteractionEnabled:TRUE];
[scroll1 setPagingEnabled:TRUE];
[scrol开发者_如何学Gol1 setScrollEnabled:TRUE];
[scroll1 showsVerticalScrollIndicator];

Thanks in advance.


You've set the frame to the same width and height as the content.
Try a smaller frame like (20, 90, 200, 300).

0

精彩评论

暂无评论...
验证码 换一张
取 消