ibireme / YYText

Powerful text framework for iOS to display and edit rich text.
MIT License
8.84k stars 1.69k forks source link

YYLabel tapAction problem #859

Open azhuk89 opened 5 years ago

azhuk89 commented 5 years ago

Hello, I found a problem and do not know how to fix it. I have UITableViewCell and YYLabel on it with highlighted url and have a handler. (swift 4, ios 11.3.1, iPhone 6s+, YYText 1.0.3 (YYText 1.0.7 has this problem too))

messageLabel.textTapAction = {containerView, text, range, rect in print("textTapAction with text: \(text.string)") }

(or highlightTapAction, it has this problem too)

When I tap on that url it works fine on the simulator. I tap on the url and the handler responds immediately. But on device I should tap, hold finger about 3 seconds and than dismiss finger before it works.

Please help! Is there any workaround to avoid this?