1、
@property(nonatomic) CGPoint contentOffset; // default CGPointZero
@property(nonatomic) CGSize contentSize; // default CGSizeZero
@property(nonatomic) UIEdgeInsets contentInset; // default UIEdgeInsetsZero. add additional scroll area around content
其中UIEdgeInsets的定义如下:
typedef struct UIEdgeInsets {
CGFloat top, left, bottom, right; // specify amount to inset (positive) for each of the edges. values can be negative to 'outset'
} UIEdgeInsets;
contentSize 就是可滚动区域
contentInset 就是scrollView中contentView的顶点相对于scrollView的位置
contentOffset 就是scrollView当前显示的顶点相对于scrollView的frame的顶点的偏移量