I have basic tabview on my screen. TabView
has 4-5 contents and a timer
manage it for move the next item. There is no issue until now.
Then user can move the pages left or right when user make this reaction I need to stop timer
and start again.
Drag gesture
working but I can not Manuel change in tabView
, kindly advise ?
TabView(selection: $index) {
ForEach(0..<data.count, id: \.self) { item in
PageContent(model: data[item])
}
}
.gesture(DragGesture(minimumDistance: 0)
.onChanged { _ in
print(" changing")
}
.onEnded { _ in print(" end") }
)
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))