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

特許から学ぶ SwiftUI

特許から学ぶ SwiftUI

2026/11/12 に ZOZO.swift #3 で発表した登壇資料です。
https://zozotech-inc.connpass.com/event/411472/
株式会社ZOZO
ZOZOTOWN開発本部
プラットフォームエンジニアリング部
lap/らぷ
#zozoswift

Avatar for ZOZO Developers

ZOZO Developers PRO

November 12, 2026

More Decks by ZOZO Developers

Other Decks in Technology

Transcript

  1. 株式会社ZOZO プラットフォームエンジニアリング部 ディレクター / テックリード lap/らぷ id: laprasdrum 2023年 中途入社

    プラットフォームエンジニアリング部で ZOZOTOWN開発全体のプロセス最適化を主務 テックリードとして iOS に関する全社横断活動を兼務 © ZOZO, Inc. 2
  2. ありました • • • • © ZOZO, Inc. Framework providing

    application programming interface for user interfaces and animation (US 11,550,601 B2) 2019/5/31 に本出願、2019/12/5 出願公開 発明者 ◦ Jacob A. Xiao ◦ Kyle S. Macomber ▪ 先の WWDC 23 のプレゼンター ◦ Joshua H. Shaffer ◦ John S. Harper UIの複雑性増加(アニメーション・イベント管理・etc.)に対する提案手法 8
  3. Application UI ‹ View tree Hello Attribute Graph Custom View

    RView Attribute1 Attribute2 Layout View SView Attribute4 Attribute3 TView UView AttributeN Image © ZOZO, Inc. Label 出典: US 11,550,601 B2 FIG. 13, Framework providing application programming interface for user interfaces and animation, Xiao et al. 9
  4. 2. UI が期待通りに振る舞い一貫性を保つシステムの必要性 • UI の一貫性を高める機能を API の構成要素に含める • Environment

    system: 親から子の View へパラメータを渡す • Preference system: 子 View の値を親へ返して反映する © ZOZO, Inc. 12
  5. TRANSACTION ANIMATION ENVIRONMENT VIEW NODE PREFERENCES EVENT HANDLER EVENT node

    は 1〜n のattribute graph で構築される © ZOZO, Inc. ROOT 出典(図): US 11,550,601 B2 FIG. 2, Framework providing application programming interface for user interfaces and animation, Xiao et al. 14
  6. Dirty bit マーキング・部分更新 • 新しい入力値には Dirty bit がセットされる ◦ InstrumentsによるSwiftUIのパフォーマンス最適化(WWDC25)では

    “Outdated” と表現 ◦ View ツリーを子ノードからボトムアップに探索 ◦ Dirty bit を付けられた属性をきっかけに、更新済みの入力属性に基づいてノード に対応する出力(View)を生成する • © ZOZO, Inc. 入力が変化しない属性は保存済みの出力を使い回す 15
  7. Kyle 氏のとある投稿 • • © ZOZO, Inc. https://x.com/kylemacomber/status/210002934741987779 4 “Fun

    fact: the creator of CoreAnimation is one of the creators of SwiftUI!” 17
  8. 今日紹介した特許 • • • © ZOZO, Inc. Framework providing application

    programming interface for user interfaces and animation (US 11,550,601 B2) 2019/5/31 に本出願、2019/12/5 出願公開 発明者 ◦ Jacob A. Xiao ◦ Kyle S. Macomber ◦ Joshua H. Shaffer ◦ John S. Harper 18
  9. CoreAnimation に関する特許 • • • © ZOZO, Inc. Framework For

    Graphics Animation And Compositing Operations (US 8,446,415 B2) Render engine/tree に関する特許 発明者 ◦ Ralph Brunner ◦ John Harper ◦ Peter N. Graffagnino 19