UIScrollView

单向滚动
scrollview的contentview的宽高值中的某一项应该小于或者等于scrollview的对应值
约束其滚动方向
scroollview.pagingEnabled=NO;

    ScrollviewContent* content=[ScrollviewContent SC_init];
    CGSize  scrollview_size=self.st_Scroollview.bounds.size;
    content.frame=CGRectMake(0, 0, scrollview_size.width/2, 2000);
    self.st_Scroollview.contentSize=content.bounds.size;
    [self.st_Scroollview addSubview:content];

UIScrollView的contentInset - 简书

Using UIScrollView with Auto Layout in iOS


XIB中UIScrollView的自动布局 - 简书

xcode6中如何对scrollview进行自动布局(autolayout) - CSDN博客

posted @ 2018-06-17 01:05  蝼蚁之毒  阅读(141)  评论(0编辑  收藏  举报