15:Swift-导航
正文
// // NavigationViewPage.swift // SwiftUIDeom // // Created by zhoukang03 on 2023/3/28. // import SwiftUI struct NavigationViewPage : View { var body: some View { NavigationView { Text("🧚♂️🧚♀️🧜♂️🧜♀️🧞♂️🧞♀️").blur(radius: 5) Text("Swifter Swifter") .bold() .foregroundColor(.orange) .font(.largeTitle) } .navigationBarTitle(Text("NavigationView")) .navigationBarItems(trailing: Button(action: { print("Tap") }, label: { Text("Right").foregroundColor(.orange) })) } } #if DEBUG struct SpacerPage_Previews : PreviewProvider { static var previews: some View { NavigationViewPage() } } #endif
示例图