optonaut / ActiveLabel.swift

UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift
MIT License
4.47k stars 686 forks source link

Custom type not working inside scroll view #310

Closed antekarin closed 5 years ago

antekarin commented 5 years ago

The tap doesn't respond inside a scroll view. I tried custom type only, can't say for others. Weird thing I found out is that if you scroll the scroll view and tap while its scrolling it works. I was thinking it was due delayed content touches but doesn't seems so.

jacolack commented 5 years ago

I found a solution. For me, I also had a UIScrollView and the Custom types weren't working in it unless I slightly scrolled while tapping. I remembered I have a UITapGestureRecognizer on my entire view, and I set

gestureRecognizer.cancelsTouchesInView = false

and the ActiveLabel works perfectly!

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.