1.在ViewController.view上添加UIScrollerView,命名Scroll View;
2.Scroll View约束:top、leading、trailing、bottom与ViewController.View相等;
3.在Scroll View上添加UIView,命名Content View;
4.Content View约束:top、leading、trailing、bottom、Equal widths、Equal heights与Scroll View相等;
5.在Content View上添加UIImageView,可以添加多个,这里添加两个,命名Left ImageView 、Right ImageView;
6.Left ImageView 、Right ImageView添加约束:top、Equal widths、Equal heights相等;
7.Left ImageView添加约束:top、leading、bottom与Scroll View相等
8.Right ImageView添加约束:Horizontal space相对于Left ImageView为0,trailing与Content View相等;
9.Content View修改约束条件优先级:Trailing Space to SUperView优先级设置Priority为250(只要比Left ImageView的Equal widths优先级低就ok)
10.添加玩图片后,Scroll View就做好了