I use TabView PageTabViewStyle with SwiftUI to display a pageview, when I swipe this TabView I find child view will Recall onAppear method Many times, Can someone tell me why?>
For everyone who is still struggling to find a good workaround for this problem. I've managed to use this framework https://github.com/fermoya/SwiftUIPager which can be used to mimic the TabView .tabViewStyle(PageTabViewStyle())
style.
import SwiftUIPager
struct Dummy: View {
@StateObject var page: Page = .first()
let numberOfPages : Int = 3
var body: some View {
Pager(page: self.page,
data: Array(0..