Skip to content

Latest commit

 

History

History
 
 

AutolayoutScrollViewInCode

Two approaches to use Autolayout in UIScrollView with pure code

These code shows two ways to use Autolayout in UIScrollView with pure code. One is using container and another is locate subviews according to the position of some other view outside the scrollview.

I highly recommand you to use container instead of a view outsdie scrollview because it is much more safe and convenient.

纯代码在UIScrollview中使用Autolayout的两种方法

主要涉及两种用代码处理autolayout和scrollview的方法。一种是利用container,另一种是通过外部的视图布局。

强烈推荐使用container,这种写法远比用外部视图安全、方便

详细的教程请参考我的博客:史上最简单的UIScrollView+Autolayout出坑指南