I found two methods in UITextViewDelegate
that available in iOS 10 or newer.
I seem them has difference type of second parameter (URL or NSTextAttachment).
optional func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool
optional func textView(_ textView: UITextView, shouldInteractWith textAttachment: NSTextAttachment, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool
When I use selector:
#selector(self.textView(_:shouldInteractWith:in:interaction:)
These two method has same syntax to defined a selector, so, how to discriminate them and how to fix error Ambiguous use of 'textView(_:shouldInteractWith:in:interaction:)'
?
Thanks for any help!