NavigationStack has some glaring UI bugs, so switch back to NavigationView for now since none of the new benefits from NavigationStack are actually being used. Signed-off-by: kingbri <bdashore3@proton.me>
31 lines
641 B
Swift
31 lines
641 B
Swift
//
|
|
// NavView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 7/4/22.
|
|
// Contributed by Mantton
|
|
//
|
|
// A wrapper that switches between NavigationStack and the legacy NavigationView
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct NavView<Content: View>: View {
|
|
@ViewBuilder var content: Content
|
|
|
|
var body: some View {
|
|
// Uncomment once NavigationStack issues are fixed
|
|
/*
|
|
if #available(iOS 16, *) {
|
|
NavigationStack {
|
|
content
|
|
}
|
|
} else {
|
|
*/
|
|
NavigationView {
|
|
content
|
|
}
|
|
.navigationViewStyle(.stack)
|
|
//}
|
|
}
|
|
}
|