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
Introducing Function Builder
Search
100059
December 17, 2019
Technology
3
770
Introducing Function Builder
potatotips #267
2019/12/17
100059
December 17, 2019
Tweet
Share
More Decks by 100059
See All by 100059
アクセシビリティが高いFlutterアプリケーションを開発する
akihisasengoku
2
3.5k
Flutter Accessibility
akihisasengoku
1
620
組織作りで大切にしていること
akihisasengoku
0
91
Bitriseのリファクタリング
akihisasengoku
1
240
Awaiting for New UI in iOS 13
akihisasengoku
0
1.4k
RxSwiftのテスト入門
akihisasengoku
1
1.1k
Other Decks in Technology
See All in Technology
Ruby on Railsで持続可能な開発を行うために取り組んでいること
am1157154
3
160
OPENLOGI Company Profile for engineer
hr01
1
20k
OPENLOGI Company Profile
hr01
0
60k
Oracle Database Technology Night #87-1 : Exadata Database Service on Exascale Infrastructure(ExaDB-XS)サービス詳細
oracle4engineer
PRO
1
220
役員・マネージャー・著者・エンジニアそれぞれの立場から見たAWS認定資格
nrinetcom
PRO
4
6.8k
LINEギフトにおけるバックエンド開発
lycorptech_jp
PRO
0
430
EDRの検知の仕組みと検知回避について
chayakonanaika
12
5.3k
Snowflakeの開発・運用コストをApache Icebergで効率化しよう!~機能と活用例のご紹介~
sagara
1
530
JAWS FESTA 2024「バスロケ」GPS×サーバーレスの開発と運用の舞台裏/jawsfesta2024-bus-gps-serverless
ma2shita
3
340
ExaDB-XSで利用されているExadata Exascaleについて
oracle4engineer
PRO
3
300
リクルートのエンジニア組織を下支えする 新卒の育成の仕組み
recruitengineers
PRO
2
180
マルチアカウント環境における組織ポリシーについて まとめてみる
nrinetcom
PRO
2
110
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing Experiences People Love
moore
140
23k
We Have a Design System, Now What?
morganepeng
51
7.4k
Why Our Code Smells
bkeepers
PRO
336
57k
Documentation Writing (for coders)
carmenintech
68
4.6k
Agile that works and the tools we love
rasmusluckow
328
21k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Building Adaptive Systems
keathley
40
2.4k
Writing Fast Ruby
sferik
628
61k
Visualization
eitanlees
146
15k
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