When a navigation view is scrolled, common behaviour in iOS is for the large navigation title to collapse into the navigation bar.
When I place a TabView inside a NavigationView, this works perfectly. As the tab is scrolled, the large navigation title collapses:
When I set the tabViewStyle to PageTabViewStyle, the collapsing behaviour no longer works — the large navigation title remains even when scrolling:
Is this behaviour intentional, or have I found a bug? This is running on iOS 14 beta 2 and the code was built on Xcode 12 beta 2.
When I place a TabView inside a NavigationView, this works perfectly. As the tab is scrolled, the large navigation title collapses:
Code Block swift NavigationView { TabView { LongList() .tabItem({ Image(systemName: "circle") Text("One") }) LongList() .tabItem({ Image(systemName: "square") Text("Two") }) } .navigationTitle("Page Control Test") }
When I set the tabViewStyle to PageTabViewStyle, the collapsing behaviour no longer works — the large navigation title remains even when scrolling:
Code Block swift NavigationView { TabView { LongList() .tabItem({ Image(systemName: "circle") Text("One") }) LongList() .tabItem({ Image(systemName: "square") Text("Two") }) } .tabViewStyle(PageTabViewStyle(indexDisplayMode: .always)) .navigationTitle("Page Control Test") }
Is this behaviour intentional, or have I found a bug? This is running on iOS 14 beta 2 and the code was built on Xcode 12 beta 2.