Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
速習iPhone Duo対応
Search
野瀬田 裕樹
September 18, 2026
Programming
210
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
速習iPhone Duo対応
extension DC Day1用です
野瀬田 裕樹
September 18, 2026
More Decks by 野瀬田 裕樹
See All by 野瀬田 裕樹
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
210
ネイティブiOSアプリだからできること
yuukiw00w
0
26
野瀬田とSwift愛好会
yuukiw00w
0
33
uhooiさん発ランダムタスクにチャレンジしよう!
yuukiw00w
1
73
ViewModelって200種類あんねん
yuukiw00w
0
50
Validate your App Intents adoption with AppIntentsTesting
yuukiw00w
0
49
App Intentsを実装しよう
yuukiw00w
0
51
iOS26時代の新規アプリ開発
yuukiw00w
0
270
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
390
Other Decks in Programming
See All in Programming
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
460
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
1.8k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
240
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
180
What We Talk About When We Talk About XP
m_seki
2
620
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
160
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
340
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
Are APIs Still Relevant in the AI Era?
soyuka
0
200
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
210
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
550
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
Rails Girls Zürich Keynote
gr2m
96
14k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
For a Future-Friendly Web
brad_frost
183
10k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Git: the NoSQL Database
bkeepers
PRO
432
67k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
320
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
A designer walks into a library…
pauljervisheath
211
25k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
540
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Navigating Weather and Climate Data
rabernat
0
520
Transcript
速習iPhone Duo対応 合同会社DMM.com 野瀬田 裕樹(@ynoseda)
Speaker 野瀬田 裕樹(@ynoseda) 京都生まれ iOSがメインだけど Androidやったり たまにFlutterもやります
iPhone Duo、出ましたね
この登壇枠を申し込んだ時 サイドローディングの話とか 新規アプリでAI前提の設計で 色々やってることとか Swift 6.4の話とか 何話そうかなって色々 考えてたけどDuoで全部飛びました
ということで、 みんなでiPhone Duo対応 再チェックしましょう!
None
折り畳んだ状態の縦横 開いた状態の縦横 折り曲げた状態の縦横
10/23までに
iPhone Duoのこの6状態を 正常動作まで持っていかないと
😇
一つずつチェックしよう
1. デザインを理解する
None
HIG曰く
標準システムコンポーネントを使用し、 サイズ変更に対応するようにしてれば、 ほとんど調整することなく、 デバイスの向きに自動的に適応します
ほんまか?
いつもと位置が違うもの • タブバー • ツールバー • ナビゲーションバー • ステータスバー •
ライブアクティビティ
いつもと位置が違うもの • 開いた状態x横向き ナビゲーションバーがなくて 右側ツールバー上寄せ • 開いた状態x縦向き ステータスバーの位置が右上固定 • 同じアプリの例でも状態で色々違う
Safe Area • 縦向きなのに 左右にSafe Area
色々な開いた状態のUIパターン • Split View
色々な開いた状態のUIパターン • Split View • Sidebar
色々な開いた状態のUIパターン • Split View • Sidebar • コンテンツを2列表示に変更 etc
2. Duoに向けたデザイン対応
Xcodeのバージョンによる違い • Xcode 27未満:中央に小さく表示される • Xcode 27:Safe Areaを避けて表示される • Xcode
27.1:全画面に表示される
None
None
None
サイズクラス @Environment @Environment (\.horizontalSizeClass) (\.verticalSizeClass) outer display compact regular outer
display (横向き) compact compact inner display regular regular (縦向き)
Safe Area • ❌ view.safeAreaInsets.left * 2 • ✅ view.bounds.inset(by:
view.safeAreaInsets).width
角丸への対応 ConcentricRectangle()
独自UIで 折り目やカメラを避けたい
折り目・カメラ:予約済領域 • reservedRegionsでその領域を取ってきて避ける GeometryReader { proxy in let 折り目領域 =
proxy.reservedRegions(kind: .division) let 折り目が折り畳まなくても取れる = proxy.reservedRegions( kind: .division, options: .includeInactive ) let カメラ領域 = proxy.reservedRegions(kind: .occlusion) }
独自UIで横2列表現をしたい
ArrangementViewで横並び • 要素を2つに分割するレイアウトを組める(iOS 27.1+) NavigationStack { ArrangementView { Primary() }
secondary: { Secondary() } .arrangementViewStyle( .split ) } Primary Primary Secondary Secondary
ArrangementViewで横並び • 横向きだけで要素を2つに分割するレイアウトを組める(iOS 27.1+) NavigationStack { ArrangementView { Primary() }
secondary: { Secondary() } .arrangementViewStyle( .split.axes(.horizontal) ) } Primary Primary Secondary
ArrangementViewでoverlay • カスタムの重ね合わせレイアウトも組める(iOS 27.1+) // 重ね合わせているときのz方向のindexも取れる @Environment(\.overlayArrangementZIndex) private var zIndex
NavigationStack { ArrangementView { // 少し折り曲げた時はSecondaryが左半分に寄るから、 // Primaryを展開して表示したい、みたいなこともできる } Primary(zIndex > 0 ? .collapsed : .expanded) } secondary: { Secondary() } .arrangementViewStyle(.overlay) Secondary Primary
3. Duo特有の折り曲げに対応
ヒンジ(折りたたみ状態)の検知 struct InstrumentView: View { @State private var pitchBend: Double
= 0 var body: some View { GuitarView(pitchBend: pitchBend) .onHingeChange { _, context in if let hinge = context.hinge, hinge.status == .partiallyOpen { pitchBend = calculatePitchBend(angle: hinge.angle) } else { pitchBend = 0 } } } private func calculatePitchBend(angle: Angle) -> Double { ... } }
ヒンジ(折りたたみ状態)の検知 • onHingeChangeで折り畳みの状態の変化を検知できる • 引数のcontextからhingeの有無や折り畳み状態や角度が取れる
4. Duoのマルチシーンに対応
内側ディスプレイで2つのsceneが起動 • Duoは複数のアプリが 立ち上がる • 内側はマルチシーン対応だけど 外側はそうじゃないので注意 • 折り畳んだ状態で 新しいscene起動すると
失敗する
新しいsceneの起動の例 // 折り畳んで外側ディスプレイを使っている時のaction let alternate = UIAction(title: <#Alternate Action Title#>,
image: <#Alternate Action Image#>, handler: { _ in <#Perform Alternate Action#> }) // 新しいsceneを起動するaction let action = UIWindowScene.ActivationAction(alternate: alternate) { _ in let activity = NSUserActivity( activityType: <#Scene Activity Type#> ) return UIWindowScene.ActivationConfiguration(userActivity: activity) }
開いた状態で 外側のディスプレイも使いたい
Scene Accessory:カメラの例 struct CameraRootView: View { @State private var model
= Model() var body: some View { CameraView(model: model) .sceneAccessory { CameraCaptureAccessory { 外側ディスプレイに表示するView(model: model) } } } }
操作しないコンテンツ表示の例 struct RootView: View { var document: PresentationDocument var body:
some View { PresentationDocumentView(document: document) .sceneAccessory { ExternalNonInteractiveAccessory { PresentationPreview(document: document) } } } }
5. Vertical Controls
〜〜Barの位置変化に対応 • 左側のアプリは左側に 右側のアプリは右側に Controlsが縦に並ぶ
〜〜Barの位置変化に対応 • システム標準のものを使う NavigationStack { SomeView().toolbar { … } }
• ToolBarItemにはアイコンとテキストの両方を設定する Label("共有", systemImage: “square.and.arrow.up") → アイコンのみ/テキストのみ/両方表示をOSがよしなに切替する
toolbarだけど テキストボタンにしたい
axisBehaviorで水平方向に表示 .toolbar { ToolbarItem { SelectOrDoneButton() } .axisBehavior(.horizontalOnly) }
axisBehaviorで垂直方向に表示 .toolbar { ToolbarItem { 独自のCustomButton() } .axisBehavior(.verticalPreferred) // 独自のViewだけど縦に並べていいならこの指定もできる
} @Environment(\.toolbarVerticalEdge) private var 垂直軸上にtoolbarがあるかどうかも取れる
fl toolbarで …になる順番を決めたい (Over ow)
TabBarよりToolbarを残す
TabBarよりToolbarを残す TabView { Tab("Recents", systemImage: "clock") { ContentView() .toolbarVerticalCompressionBehavior( .prefersToolbarItems
// Toolbarが先に…になるデフォルト挙動を変えられる } } )
…を最後まで避ける要素を決める .toolbar { ToolbarItemGroup(placement: .primaryAction) { Button(〜〜) } .visibilityPriority(.high) //
.visibilityPriority(.low) 先に…に入る要素の指定も可 }
6. まとめ
やること • Xcode 27.1でビルドする • Size ClassとSafe Areaに対応してresizableにする • カスタムView関係に対応する(カスタムのtoolbarItemなど)
• Duoならではの表示に最適化する (2列表示、ヒンジ対応、折り曲げた状態でのUI調整など)
やっていきましょう