#67 Scroll View 決定捲動範圍的 Content Layout Guide

Timmy-Luo
Sep 5, 2021

--

利用 Scroll View 內建的縮放功能,可以快速實現圖片縮放的功能

加入 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

--

--