JWAutumn / ACarousel

A carousel view for SwiftUI | SwiftUI 旋转木马效果
MIT License
381 stars 78 forks source link

scroll event ignored if the carousel view in the TabView and item view have tap gesture #15

Open fso-msrl opened 2 years ago

fso-msrl commented 2 years ago

This is the sample structure:

TabView { VStack { ACarousel(items) { item in ItemView(item) .onTapGesture { "do something" } } }

VStack {...} VStack {...} VStack {...} } .tabViewStyle(.page(indexDisplayMode: .never))

I want to swipe the carousel item if i drag inside

trantran8 commented 1 year ago

Hi, I had this issue too, did you fix it?

fso-msrl commented 1 year ago

Hi, I had this issue too, did you fix it?

I cant fix it because the gesture is private, I cant set it to higher priority. Now I used another one ACarousel instead of TabView

like this: ACarousel(pages) { page in VStack { ...some views ACarousel(items) { item in ItemView(item) .onTapGesture { "do something" } } } }

Seem works! hope it can help you first

trantran8 commented 1 year ago

Thank you, let me try