最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[已解决]swift支持长按

Swift crifan 2619浏览 0评论

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支持长按

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
84 queries in 0.191 seconds, using 22.06MB memory