iOS 长按复制
2020-04-14 本文已影响0人
Eyes_cc
1、
// 长按手势
let longpressGesutre = UILongPressGestureRecognizer(target: self, action: #selector(self.handleLongpressGesture(tap:)))
linkLab.addGestureRecognizer(longpressGesutre)
2、
@objc func handleLongpressGesture(tap: UILongPressGestureRecognizer) {
UIPasteboard.general.string = singleMaterialModel.content
if self.delegate != nil {
self.delegate?.didCopySuccess!()
}
}