What's the preferred way enable scroll behind tab bar in nested ScrollView in SwiftUI

I am having a root TabView with tabs. One of the tabs has a TabBar with page style as the root view and each Page has a ScrollView. Unfortunately the scroll view get's clipped by the parent TabView size. But I want to make the ScrollView content to go behind the root TabView's tab bar like it would work if I would have the ScrollView as direct child to the root TabBar

I tried using ignoreSafeArea on the page style TabView and there are other weird bugs, it stops reacting to the Binding pageIndex I am having as a State. The custom page index view disappears

Sample code: https://github.com/BProg/TabViewScrollViewBug.git

Answered by ostafi1010 in 898601022

Actually I found solution using Codex, right in the sample project: apply the ignoreSafeArea on the ScrollView

Sample code in original post

Accepted Answer

Actually I found solution using Codex, right in the sample project: apply the ignoreSafeArea on the ScrollView

What's the preferred way enable scroll behind tab bar in nested ScrollView in SwiftUI
 
 
Q