Post

Replies

Boosts

Views

Activity

iOS 15 SwiftUI Navigation > Tab View > List Not Displaying Navigation View Correctly
I have been working on a SwiftUI app that targets both iOS/iPhones and iPadOS/iPads and have found an issue with a the List contents being completely visible (i.e. not blurred) under the Navigation Title as shown below. It seems to only occur if the detail view is a TabView, and even then it still doesn't occur every time. The issue only occurs on iPads. Everything seems work fine on iPhones running iOS 15. A recreation can be found in the following code: import SwiftUI struct TestMainList: View {     var body: some View {         NavigationView {             ScrollView {                 VStack {                     ForEach(1..<21) {                         NavigationLink("Detail \($0)", destination: TestDetailTabView(name: "Detail \($0)"))                             .padding()                         Divider()                     }                     NavigationLink(destination: EmptyView()) {                         EmptyView()                     }                 }             }             .edgesIgnoringSafeArea([.bottom])             .navigationTitle(Text("List"))             EmptyDetailView()         }     } } struct EmptyDetailView: View {     var body: some View {         Text("Select a detail item to view")     } } struct TestDetailTabView: View {     var name: String     var body: some View {         TabView {             List {                 ForEach(1..<21) {                     Text("\(name) Row \($0)")                 }             }             .listStyle(.plain)             .navigationBarTitle(Text(name))             .tabItem {                 Image(systemName: "tablecells")             }             Text("Some Other Content")                 .navigationTitle("Other Tab")                 .tabItem {                     Image(systemName: "note")                 }         }     } }
0
0
1.5k
Aug ’21