SwiftUI authentication view
问题 In swift UI I want the content view to be my root view for my app with a conditional setup to check if the users is logged in or not. If the user is logged in a list view shows other wise show the login view so the user can log in. Based on my research i could not find a best way to do this. In my case I can not get the solution I found to work and do not know if it is the best solution. import SwiftUI struct ContentView: View { @ObservedObject var userAuth: UserAuth = UserAuth() // MARK: -