I try to use a PageTabViewStyle for TabView but it seems to be broken. It works fine when I use a static preloaded content.
TabView {
ForEach(viewModel.objects) { object in
ObjectView(object)
}
}
.tabViewStyle(PageTabViewStyle())
.indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))
But when I try to add a new Page there
viewModel.objects.append(newObject)
It affects only the IndexIndicator (add one more dot there), but not the content. A new object doesn't appear and I can't get scroll to it.
viewModel is a @StateObject and objects in viewModel is a @Published property