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
Introducing Function Builder
Search
100059
December 17, 2019
Technology
910
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introducing Function Builder
potatotips #267
2019/12/17
100059
December 17, 2019
More Decks by 100059
See All by 100059
アクセシビリティが高いFlutterアプリケーションを開発する
akihisasengoku
2
4.1k
Flutter Accessibility
akihisasengoku
1
760
組織作りで大切にしていること
akihisasengoku
0
150
Bitriseのリファクタリング
akihisasengoku
1
390
Awaiting for New UI in iOS 13
akihisasengoku
0
1.6k
RxSwiftのテスト入門
akihisasengoku
1
1.2k
Other Decks in Technology
See All in Technology
Spring BootからQuarkusへの移行
tatsuya1bm
2
120
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
1.9k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
500
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
1.9k
iOSDC Japan 2026 day1 TrackC 10:50
feedtailor
1
160
AI に書かせたその API、 “信頼” できますか?
nagix
0
110
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
負債のメタファと2026年 / Debt Metaphor in Agentic Engineering Age 202609 Edition
twada
PRO
5
2.6k
Omarchy Quattro の日本語設定周り
simosako
2
180
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
740
あるけみー式LTスライド作成術
alchemy1115
1
210
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
1
1.3k
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
320
Rails Girls Zürich Keynote
gr2m
96
14k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
YesSQL, Process and Tooling at Scale
rocio
174
15k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
The Curse of the Amulet
leimatthew05
3
14k
Designing for humans not robots
tammielis
254
26k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Writing Fast Ruby
sferik
630
63k
First, design no harm
axbom
PRO
2
1.3k
Transcript
Introducing Function Builder potatotips #267 2019/12/17
Akihisa Sengoku @akihisasen גࣜձࣾαΠόʔΤʔδΣϯτ AmebaʢΞϝʔόʣ iOSΤϯδχΞ
Function Builderͱʁ
4XJGU6*ͰΘΕ͍ͯΔΫϩʔδϟʔతͳͷʁ
%4-Λॻ͘͜ͱ͕Ͱ͖ΔΑ͏ʹͳͬͨʁ
4XJGUͰՃ͞Εͨ৽ػೳ 1SPQPTBM 'PSVN
BuilderͷϧʔϧʹैͬͯؔΛ ҉తʹม͢Δ͜ͱ͕Ͱ͖Δ #VJMEFSΛ దԠͨؔ͠ #VJMEFSϧʔϧʹ Ԡͯؔ͡Λม #VJMEFSΛఆٛ #VJMEFSΛ దԠ
None
None
Function BuilderʹΑΓ ಠࣗͷDSLΛΑΓ࡞͘͢͠ͳͬͨ - Structure Data (json, XML) - UI
View Hierarchies - HTML DOM Hierarchies
࡞Γํ!
#VJMEFSͷ࡞ํ๏ʹ͍ͭͯ
Builderͷ࡞ํ๏ 1. struct or classͷલʹ`@_functionBuilder`Λ͚ͭͯ ఆٛ͢Δɻ 2. static func Ͱ
`buildBlock(_ components: Component...) -> Component` Λఆٛ͢Δɻ
ͦͷଞͷbuildͷ࣮ • buildExpression(_ expression: Expression) -> Component • buildFunction(_ components:
Component...) - > Return • buildDo(_ components: Component...) -> Component • buildOptional(_ component: Component?) -> Component
'VODUJPO#VJMEFSͷ༻ํ๏
Function Builderͷ༻ํ๏ 1. Function BuilderΛ༻͍ͨؔ͠ͷલʹ @FunctionBuilder໊Λ͚ͭΔ 2. BuilderͷbuildBlockʹରԠ͢ΔҾΛɺ վߦ۠ΓͰهड़
ؔͷҾͷΫϩʔδϟͰFunction Builder Λ༻͢Δ͜ͱ͕Ͱ͖Δ
None
ϓϩμΫτಋೖ
SwiftUI HTML NSAttributedString Network UIKit ϓϩμΫτಋೖ: DSL
Amebaͷಋೖྫ NSAttributedStringͷIFΛ៉ྷʹ 5JQT
What's New in Swift - WWDC2019 https://developer.apple.com/videos/play/ wwdc2019/402/ Function Builder
- swift-evolution https://github.com/apple/swift-evolution/blob/ 9992cf3c11c2d5e0ea20bee98657d93902d5b17 4/proposals/XXXX-function-builders.md