16 lines
476 B
Swift
16 lines
476 B
Swift
import SwiftUI
|
|
|
|
struct NavigationStackChecker: UIViewControllerRepresentable {
|
|
@Binding var isInside: Bool
|
|
|
|
func makeUIViewController(context: Context) -> UIViewController {
|
|
let viewController = UIViewController()
|
|
DispatchQueue.main.async {
|
|
self.isInside = viewController.navigationController != nil
|
|
}
|
|
return viewController
|
|
}
|
|
|
|
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
|
|
}
|