加入 Scroll View
選取 View 、Scroll View 設定上下左右的間距為 0
Scroll View 還無法推算捲動的範圍,所以會出現錯誤
將 Image View 加到 Scroll View 裡面
設定圖片的寬高
設定圖片和 Content Layout Guide 之間零距離,彼此間距 0
選取 Image View、Content Layout Guide,設定上下左右對齊讓圖片和 Content Layout Guide 的間距為 0
這樣就完成了!在 Interface Builder 裡就可以捲動 Scroll View
⚠️點選 Scroll View 裡的東西才能捲動畫面
參考文章