long press
swift long press
ios – Swift: Long Press Gesture Recognizer – Detect taps and Long Press – Stack Overflow
How to do a long press in Swift? – Stack Overflow
Detecting Long-Press Gestures Tutorial in iOS8 with Swift – iOScreator
UILongPressGestureRecognizer Class Reference
self.addSubview(displayTextView) //add long press support lpgr = UILongPressGestureRecognizer(target: self, action: "longPressAction:") self.displayTextView.addGestureRecognizer(lpgr!) func longPressAction(sender: UILongPressGestureRecognizer) { print("longPressAction sender=\(sender)") } |
但是:
[已解决]swift中自定义的UITableViewCell中无法获取长按UILongPressGestureRecognizer
转载请注明:在路上 » [已解决]swift支持长按