Post

Replies

Boosts

Views

Activity

`PageTabViewStyle` for `TabView` doesn't work with adding new Page
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
1
0
2.5k
Jul ’20