Add navigation view
This commit is contained in:
parent
34eea85025
commit
6a4fa1cfd9
2 changed files with 10 additions and 6 deletions
|
@ -1,13 +1,17 @@
|
|||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
struct ProfileView: View {
|
||||
var body: some View {
|
||||
Text("Hello, World!")
|
||||
Text("Hello, world!")
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
struct MainView: View {
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
NavigationLink(destination: ProfileView()) {
|
||||
Text("Show Feed")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||
|
||||
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
||||
|
||||
let contentView = ContentView()
|
||||
let contentView = MainView()
|
||||
|
||||
if let windowScene = scene as? UIWindowScene {
|
||||
let window = UIWindow(windowScene: windowScene)
|
||||
|
|
Reference in a new issue