UIScrollView

来源:互联网 发布:vb winhttp 编辑:程序博客网 时间:2024/06/05 20:01

http://www.cnblogs.com/wendingding/p/3754210.html

如果UIScrollView⽆无法滚动,可能是以下原因: 

(1)没有设置contentSize

(2) scrollEnabled = NO

(3) 没有接收到触摸事件:userInteractionEnabled = NO

(4)没有取消autolayout功能(要想scrollView滚动,必须取消autolayout) 

属性

(1)常用属性:

1)@property(nonatomic)CGPointcontentOffset; 这个属性⽤用来表⽰示UIScrollView滚动的位置

2)@property(nonatomic)CGSizecontentSize;这个属性⽤用来表⽰示UIScrollView内容的尺⼨寸,滚动范围(能滚多远)

3)@property(nonatomic)UIEdgeInsetscontentInset; 这个属性能够在UIScrollView的4周增加额外的滚动区域 

(2)其他属性:

1)@property(nonatomic) BOOL bounces;  设置UIScrollView是否需要弹簧效果 

2)@property(nonatomic,getter=isScrollEnabled)BOOLscrollEnabled; 设置UIScrollView是否能滚动 

3)@property(nonatomic) BOOL showsHorizontalScrollIndicator; 是否显⽰示⽔水平滚动条 

4)@property(nonatomic) BOOL showsVerticalScrollIndicator; 是否显⽰示垂直滚动条 


http://blog.csdn.net/qijianli/article/details/7781918


http://my.oschina.net/u/2340880/blog/424842


http://www.oschina.net/search?scope=blog&q=UIScrollView


http://blog.csdn.net/leikezhu1981/article/details/9096185

0 0