iOS-study
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TestView.swift 798B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // TestView.swift
  3. // iOSFirst
  4. //
  5. // Created by 孙宇峰 on 2023/2/23.
  6. //
  7. import SwiftUI
  8. struct TestView: View {
  9. @Binding var settingPagePresented: Bool
  10. var body: some View {
  11. NavigationView {
  12. Text("hello world")
  13. .navigationTitle("设置")
  14. .navigationBarItems(leading: Button(action: {
  15. settingPagePresented = false
  16. }, label: {
  17. Image(systemName: "globe")
  18. .imageScale(.large)
  19. .foregroundColor(.accentColor)
  20. }))
  21. .navigationBarTitleDisplayMode(.inline)
  22. }
  23. }
  24. }
  25. struct TestView_Previews: PreviewProvider {
  26. static var previews: some View {
  27. TestView(settingPagePresented: .constant(true))
  28. }
  29. }