此行是給我的錯誤:如何在swift 3中使用平移手勢的方法?
let recognizer = UIPanGestureRecognizer(target: self, action: Selector(("handlePan")))
此行是給我的錯誤:如何在swift 3中使用平移手勢的方法?
let recognizer = UIPanGestureRecognizer(target: self, action: Selector(("handlePan")))
據我瞭解您的問題將在語法改變一點點解決。我也曾遇到過這種情況。試試這個
let recognizer = UIPanGestureRecognizer(target: self, action: #selector(CustomTableViewCell.handlePanTest(_:)))
最後,它工作。 –
感謝您的幫助@AXY –
let recognizer = UIPanGestureRecognizer.init(target:self,action:#selector(handlePan))。使用這一行。 –
我試過了,但仍然沒有工作。 –
請分享代碼 –