diff --git a/NavigationExemple/ContentView.swift b/NavigationExemple/ContentView.swift index 93ceb5b..bd9c1a5 100644 --- a/NavigationExemple/ContentView.swift +++ b/NavigationExemple/ContentView.swift @@ -10,28 +10,18 @@ import SwiftUI struct ContentView: View { - @State private var score = 0 + @State private var fullScreen = false var body: some View { NavigationView{ - Text("Score: \(score)") - .navigationTitle("Menu principal") - .navigationBarItems( - - trailing: - HStack{ - Button("Add"){ - self.score += 1 - } - - Button("Sub"){ - self.score -= 1 - } - } - - ) + Button("Toogle full screen"){ + self.fullScreen.toggle() + } + .navigationBarTitle("Full Screen") + .navigationBarHidden(fullScreen) } + .statusBar(hidden: fullScreen) } }