UIScrollView的属性

UIScrollView的常见属性

  • @property(nonatomic) CGPoint contentOffset;
    • 这个属性用来表示UIScrollView滚动的位置 (其实就是内容左上角与scrollView左上角的间距值)
  • @property(nonatomic) CGSize contentSize;
    • 这个属性用来表示UIScrollView内容的尺寸,滚动范围(能滚多远)
  • @property(nonatomic) UIEdgeInsets contentInset;
    • 这个属性能够在UIScrollView的4周增加额外的滚动区域,一般用来避免scrollView的内容被其他控件挡住

UIScrollView的其他属性

  • @property(nonatomic) BOOL bounces;
    • 设置UIScrollView是否需要弹簧效果
  • @property(nonatomic,getter=isScrollEnabled) BOOL scrollEnabled;
    • 设置UIScrollView是否能滚动
  • @property(nonatomic) BOOL showsHorizontalScrollIndicator;
    • 是否显示水平滚动条
  • @property(nonatomic) BOOL showsVerticalScrollIndicator;
    • 是否显示垂直滚动条

results matching ""

    No results matching ""