UIScrollView的属性理解
程序员文章站
2024-02-22 22:13:34
...
设置scrollView的属性
//设置UIScrollView的滚动范围(内容大小)
scrollView.contentSize = imageView.image.size;
//隐藏水平滚动条
scrollView.showsHorizontalScrollIndicator = NO;
scrollView.showsVerticalScrollIndicator = NO;
//用来记录scrollview滚动的位置
// scrollView.contentOffset = ;
//去掉弹簧效果
// scrollView.bounces = NO;
//增加额外的滚动区域(逆时针,上、左、下、右)
// top left bottom right
scrollView.contentInset = UIEdgeInsetsMake(20, 20, 20, 20);
_scrollView = scrollView;
转载于:https://my.oschina.net/daxiaLKS/blog/528374
上一篇: ejb有状态与无状态的比较