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
840
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.8k
Flutter Accessibility
akihisasengoku
1
670
組織作りで大切にしていること
akihisasengoku
0
100
Bitriseのリファクタリング
akihisasengoku
1
290
Awaiting for New UI in iOS 13
akihisasengoku
0
1.5k
RxSwiftのテスト入門
akihisasengoku
1
1.1k
Other Decks in Technology
See All in Technology
MCP ✖️ Apps SDKを触ってみた
hisuzuya
0
290
Findy Team+ QAチーム これからのチャレンジ!
findy_eventslides
0
500
フレームワークを意識させないワークショップづくり
keigosuda
0
240
serverless team topology
_kensh
2
130
あなたの知らない Linuxカーネル脆弱性の世界
recruitengineers
PRO
3
130
Claude Code Subagents 再入門 ~cc-sddの実装で学んだこと~
gotalab555
10
17k
旅で応援する✈️ NEWTが目指すコミュニティ支援とあたらしい旅行 / New Travel: Supporting by NEWT on Your Journey
mii3king
0
140
今この時代に技術とどう向き合うべきか
gree_tech
PRO
2
2.1k
Kubernetes self-healing of your workload
hwchiu
0
350
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
混合雲環境整合異質工作流程工具運行關鍵業務 Job 的經驗分享
yaosiang
0
140
「魔法少女まどか☆マギカ Magia Exedra」のIPのキャラクターを描くための3Dルック開発
gree_tech
PRO
0
150
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Facilitating Awesome Meetings
lara
57
6.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Pragmatic Product Professional
lauravandoore
36
7k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Rails Girls Zürich Keynote
gr2m
95
14k
Code Review Best Practice
trishagee
72
19k
Typedesign – Prime Four
hannesfritz
42
2.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
570
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