次のコードがあります。
deleteAllButton.setTitle("Delete", forState: .Normal)
deleteAllButton.titleLabel?.numberOfLines = 2
deleteAllButton.setTitleColor(UIColor.blackColor(), forState: .Normal)
deleteAllButton.titleLabel?.font = UIFont.systemFontOfSize(keyboardFontSize)
// deleteAllButton.addTarget(self, action: #selector(deletekeyPressed), forControlEvents: .TouchUpInside)
let deleteLPGR = UILongPressGestureRecognizer(target: self, action: #selector(deleteButtonLongPress))
deleteLPGR.minimumPressDuration = 0
deleteLPGR.delaysTouchesBegan = true
deleteAllButton.addGestureRecognizer(deleteLPGR)
通常、UIButton が押されると、テキストの色が自動的に変わり、「押された」状態であることを示します。ただし、長押しジェスチャ認識機能を追加したため、ボタンは「押された」状態であることを示しません。
ユーザーがボタンが実際に「押された」ように感じるように、タッチイベントがボタンを通過できるようにするにはどうすればよいですか?