ElaWorkshop / TagListView

Simple and highly customizable iOS tag list view, in Swift.
MIT License
2.64k stars 492 forks source link

.onTap not working as expected #229

Closed joogps closed 5 years ago

joogps commented 5 years ago

I've got the following TagListView inside an app I'm making:

(FYI, it's in Portuguese)

The problem is that the onTap property is set on all tags, but the ones on the second and third row don't seem to capture the entire frame in the touch event. Apparently, only the top part of them is captured to execute the function. The ones on the first row, in the other hand, work just fine.

Link to project (The code isn't commented at all)

joogps commented 5 years ago

I found out why the bug was happening. It was because the frame of the TagListView wasn't covering all of the TagViews. I changed the bottom constrain to 0 and voila! The bug was gone.