📦Path

What's the difference between Shape and Path

  • Path 是一個 struct,主要是用絕對座標 (absolute coordinates) 來畫路徑。

  • Shape 是一個 protocol,除了可以用絕對座標畫路徑外,必要實現的 .path(in: rect) 方法也提供了一個 CGRect 參數,讓我們可以根據 container 的相對位置來畫路徑。 👉 Paul

Last updated

Was this helpful?