我的代码在iOS 12的最新版本中有效,但是在iOS 13之后,此代码无法调用选择器 我在iOS 13上使用了 UIGestureRecognizerDelegate
这是我的代码
let panGest = UIPanGestureRecognizer(target: self,action: #selector(self.handletap(_:)))
panGest.delegate = self
txtVw.addGestureRecognizer(panGest)
这是我的txtVw = subVws为! UITextView,txtVw = subVws as! UITextView
我使用了以下代码:
let panGest = UIPanGestureRecognizer(target: self,action: #selector(self.handletap(_:)))
self.view.addGestureRecognizer(panGest)
它的工作,但我有一个子视图,因为子视图是行不通的,请致电!!
不调用self.handletap或gestureRecognizer(_:shouldRecognizeSimultaneouslyWith:)