Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SwiftUI Inspectorが難しすぎる / Mobile Act OSAKA 18
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yutaro Muta
March 25, 2026
Programming
100
0
Share
SwiftUI Inspectorが難しすぎる / Mobile Act OSAKA 18
Mobile Act OSAKA 18
https://mobileact.connpass.com/event/383587/
Yutaro Muta
March 25, 2026
More Decks by Yutaro Muta
See All by Yutaro Muta
Google Nest CamとApple Vision frameworkと猫🐈🐈⬛ / onishi50
yutailang0119
0
170
Swift Concurrencyでのスケジュール処理を考える / Mobile Act OSAKA 17
yutailang0119
0
150
猫と暮らすネットワークカメラ生活🐈 ~Vision frameworkでペットを愛でよう~ / iOSDC Japan 2025
yutailang0119
0
410
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
310
Swiftの “private” を テストする / Testing Swift "private"
yutailang0119
0
340
Apple Vision Pro購入RTA 1泊3日弾丸ハワイツアー / RTA: Purchase Apple Vision Pro in Hawaii
yutailang0119
0
1.5k
個人開発のたのしみ / Enjoying personal development
yutailang0119
0
1.1k
バックポートして学ぶ新APIの仕組み
yutailang0119
0
3.3k
Backport AsyncImage
yutailang0119
0
810
Other Decks in Programming
See All in Programming
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
140
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
220
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
170
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
5
710
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.2k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
2
420
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
160
Oxlintのカスタムルールの現況
syumai
5
730
RTSPクライアントを自作してみた話
simotin13
0
280
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
200
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
130
The agentic SEO stack - context over prompts
schlessera
0
790
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
New Earth Scene 8
popppiees
3
2.3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
820
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
260
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
920
Transcript
SwiftUI Inspectorが 難しすぎる id:yutailang0119 / @yutailang0119 2026/03/06 Mobile Act Osaka
18 1
yutailang0119 • 株式会社はてな ◦ @京都オフィス ◦ アプリケーションエンジニア ◦ サービスプラットフォームチーム •
try! Swift Tokyo Organizer ◦ 2026チケット販売中 • AVP座談会 🥽 2
3 SwiftUI Inspector
4 macOS 26.3
5
6
7 iPadOS 26.2 (w/ Xcode 26.3)
8
9
10 iOS 26.2 (w/ Xcode 26.3)
11
12
13 SwiftUI inspector(isPresented:content:)
inspector(isPresented:content:) • Navigationコンポーネントとpresentation両方 の性質を持つ • 高度な抽象化(単なるサイドバーではない) ◦ 画面サイズが小さい(コンパクト) >「シート」 ◦
大きなiPadの分割画面 > 「オーバーレイ」 • iOS 17.0+, iPadOS 17.0+, Mac Catalyst 17.0+, macOS 14.0+ 14
15 今回のお題
今回のお題 16 • inspector(isPresented:content:) を使用 • inspector、toolbarの配置を試す
17 ① Inside navigation
① 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) {} } } }
19
20 Inspector内で NavigationLinkする と...
Inspector内でNavigationLink 21 struct Inspectors: View { var body: some View
{ NavigationStack { RootView() .toolbar { Toggle(isOn: $isPresented) } .inspector(isPresented: $isPresented) { NavigationStack { NavigationLink() } } } } }
22
23
24
Inside navigationの課題 25 • Inspector内のNavigationLinkが外側で実 行 ◦ 別NavigationStackのスコープ外 ◦ コンパクトレイアウトでは、裏側で遷移してしまう
• Inspector内の実装が外側に巻き上げられる ◦ NavigationLink ◦ Modifier
Inspectorの巻き上げ 26 • 巻き上げられる ◦ seachable ◦ toolbar ◦ ...
• 巻き上げられない ◦ refreshable ◦ ...
27
28 ② Outside navigation
② 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) {} } }
30
31
Outside navigationの注意点 32 • Inspector表示用のtoolbarをInspector側 に置けない ◦ 操作できなくなる
Outside navigationの注意点 33 struct Inspectors: View { var body: some
View { NavigationStack { RootView() } .inspector(isPresented: $isPresented) { NavigationStack { Inspector() .toolbar { Toggle(isOn: $isPresented) } } } } }
34
35
36 Inspector Placement
37 https://developer.apple.com/videos/play/wwdc2023/10161/
まとめ 38 • InspectorはNavigationとToolbarとの組 み合わせで配置を考える • Inspector内で凝った実装をしない! ◦ NavigationLink ◦
searchable ◦ ...
39 ところで現代... Inspectorの使用箇所 減っていません...?
40 Keynote 15.1.1 on iPadOS 26.3.1
iOS 26ではFullモーダルに変更 41 iOS 18.6 iOS 26.2
42 Liquid Glass時代の Inspector...
References 43 • https://developer.apple.com/documentation/SwiftUI/View/insp ector(isPresented:content:) • https://developer.apple.com/videos/play/wwdc2023/10161/ • https://www.createwithswift.com/presenting-an-inspector-wit h-swiftui/
44 Advertisement
45
try! Swift Tokyo 2026 • 2026/04/12 (日) - 14 (火)
• 立川ステージガーデン • https://tryswift.jp/ 46
hatena.co.jp/recruit 47 47