1、UIScrollView *sc = [UIScrollViewnew];
2、sc.bounces = NO; //默认YES :横向和纵向
3、sc.alwaysBounceHorizontal = YES; //只横向
4、sc.showsHorizontalScrollIndicator = YES; //指示器
5、设置scrollView的frame和contentSize
(注意contentSize的宽度要大于frame宽度才能滚动)
1、UIScrollView *sc = [UIScrollViewnew];
2、sc.bounces = NO; //默认YES :横向和纵向
3、sc.alwaysBounceHorizontal = YES; //只横向
4、sc.showsHorizontalScrollIndicator = YES; //指示器
5、设置scrollView的frame和contentSize
(注意contentSize的宽度要大于frame宽度才能滚动)