1
Fork 0

Add navigation view

This commit is contained in:
redstrate 2020-06-03 21:33:48 -04:00
parent 34eea85025
commit 6a4fa1cfd9
2 changed files with 10 additions and 6 deletions

View file

@ -1,13 +1,17 @@
import SwiftUI import SwiftUI
struct ContentView: View { struct ProfileView: View {
var body: some View { var body: some View {
Text("Hello, World!") Text("Hello, world!")
} }
} }
struct ContentView_Previews: PreviewProvider { struct MainView: View {
static var previews: some View { var body: some View {
ContentView() NavigationView {
NavigationLink(destination: ProfileView()) {
Text("Show Feed")
}
}
} }
} }

View file

@ -6,7 +6,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
let contentView = ContentView() let contentView = MainView()
if let windowScene = scene as? UIWindowScene { if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene) let window = UIWindow(windowScene: windowScene)