Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SwiftUI Inspectorが難しすぎる / Mobile Act OSAKA 18

SwiftUI Inspectorが難しすぎる / Mobile Act OSAKA 18

Avatar for Yutaro Muta

Yutaro Muta

March 25, 2026
Tweet

More Decks by Yutaro Muta

Other Decks in Programming

Transcript

  1. 5

  2. 6

  3. 8

  4. 9

  5. 11

  6. 12

  7. ① Inside navigation 18 struct Inspectors: View { @State private

    var isPresented: Bool = false var body: some View { NavigationStack { RootView() .toolbar { Toggle(isOn: $isPresented) } .inspector(isPresented: $isPresented) {} } } }
  8. 19

  9. Inspector内でNavigationLink 21 struct Inspectors: View { var body: some View

    { NavigationStack { RootView() .toolbar { Toggle(isOn: $isPresented) } .inspector(isPresented: $isPresented) { NavigationStack { NavigationLink() } } } } }
  10. 22

  11. 23

  12. 24

  13. 27

  14. ② Outside navigation 29 struct Inspectors: View { @State private

    var isPresented: Bool = false var body: some View { NavigationStack { RootView() .toolbar { Toggle(isOn: $isPresented) } } .inspector(isPresented: $isPresented) {} } }
  15. 30

  16. 31

  17. Outside navigationの注意点 33 struct Inspectors: View { var body: some

    View { NavigationStack { RootView() } .inspector(isPresented: $isPresented) { NavigationStack { Inspector() .toolbar { Toggle(isOn: $isPresented) } } } } }
  18. 34

  19. 35

  20. 45

  21. try! Swift Tokyo 2026 • 2026/04/12 (日) - 14 (火)

    • 立川ステージガーデン • https://tryswift.jp/ 46