Can anybody tell me why my views looks fine in the preview, but get pushed down in the simulator? It's super simple and very little code so I honestly have no idea what's going on. Here is my code:
import SwiftUI
import FirebaseAuth
struct MainView: View {
@EnvironmentObject var viewModel: AppViewModel
var body: some View {
NavigationView {
List {
ForEach(0..<10) { _ in
Text("Views go here")
Text("Something else to track")
} //: LOOP
} //: LIST
.navigationTitle("Track Stuff")
.navigationBarItems(
trailing: Button(action: {viewModel.signOut()}) {
Text("Sign out")
.foregroundColor(buttonColor)
}
)
} //: NAVIGATION
.navigationViewStyle(StackNavigationViewStyle())
}
}
struct MainView_Previews: PreviewProvider {
static var previews: some View {
MainView()
}
}