danielsaidi / SwiftUIKit

SwiftUIKit is a Swift SDK that adds extra functionality to Swift & SwiftUI.
MIT License
1.4k stars 54 forks source link

OnTapGesutre on CollectionView prevents scrolling #6

Closed jlcanale closed 2 years ago

jlcanale commented 2 years ago

Whenever I add a .OnTapGesture to a view contained in a CollectionView row, the gesture works just fine, but the collection view no longer responds to scrolling.

Is this a bug, or am I just missing something?

danielsaidi commented 2 years ago

Hmmm, I must give this a try. I don't have this problem in my tvOS app, which is the only place where I use it.

jlcanale commented 2 years ago

Hmm, seems like you're right. I just tried modifying the CollectionViewShelvesScreen in the Demo app, where I added an .OnTapGesture {} to the view created in the cell(at:for), and it worked just fine. I must be doing something wrong in my app. I'll close this issue, but if I solve it, I'll make sure to come back and put notes here as to what I was doing wrong. Maybe it'll help someone else.

danielsaidi commented 2 years ago

Ok, I hope you find the problem! Sharing any findings would be awesome, thank you!