最新消息:VPS服务器又从fzhost.net换回linode了,主题仍用朋友推荐的大前端D8

[已解决]swift支持长按

Swift crifan 113浏览 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,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
19 queries in 0.237 seconds, using 9.80MB memory