0
似乎無法打印觸摸階段的字符串值已經試過這樣:Swift OS X NSTouch階段rawInput到字符串?
let phase = NSTouch.Phase(rawValue: touch.phase.rawValue)
print(phase)
let touches = event.touches(matching: NSTouch.Phase.ended, in: self.view)
touches.forEach { (touch) in
print(" touch up \(touch.phase)")
}
輸出我得到的是周圍這個
Phase(rawValue: 8)
﹣ touch up Phase(rawValue: 8)