- 開啟新的專案,將 playground 加入
- 加入外掛套件『 SwiftyDraw 』
- 接著回到 playground 輸入以下的程式碼
import UIKitimport SwiftyDrawimport PlaygroundSupportlet drawView = SwiftyDrawView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))drawView.brush.color = Color(UIColor(red: 1, green: 0, blue: 0, alpha: 1))drawView.brush.width = 5PlaygroundPage.current.liveView = drawView