0
私はスウィフトにこの行を書き換えるしようとしている3 スウィフト2: ましょうlongPress:UILongPressGestureRecognizer = UILongPressGestureRecognizer(ターゲット:自己、アクション: "longPressDetected")ジェスチャー投げ認識されないセレクターエラー
スウィフト3 :
let longPress: UILongPressGestureRecognizer = UILongPressGestureRecognizer(target: self, action: Selector(("longPressDetected")))
が、それは、このエラーに
unrecognized selector sent to instance
を投げているように見えます
呼び出すようにしようとしているされた機能はこれです:
func longPressDetected(_ sender: Any){}
(target:self、action:#selector(ViewController.handleLongPress(_ :))) –