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
930
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.2k
Flutter Accessibility
akihisasengoku
1
770
組織作りで大切にしていること
akihisasengoku
0
160
Bitriseのリファクタリング
akihisasengoku
1
400
Awaiting for New UI in iOS 13
akihisasengoku
0
1.6k
RxSwiftのテスト入門
akihisasengoku
1
1.2k
Other Decks in Technology
See All in Technology
自律的なチームを作るためにTechPMがやらないこと
ny7760
1
530
新卒エンジニア、 介護士になる
ryu1013
1
690
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
3
1.7k
属人化したISMS運用をGitHubとAIで仕組み化した1年間の記録
sioncojp
2
1.2k
AI時代の組織作り:チーム開発から「個人×AI」への移行と、持続可能な「開発資本」の築き方
ham0215
2
350
ゼロから作るWebアプリの新定番!?Amplify Gen 2 × AWS Blocksで実現する「開発速度とRDBの柔軟性のいいとこ取り」
amixedcolor
1
180
TSKaigi Sendai 2026 - tsgo時代のTypeScript Playgroundはどう動くか
teamlab
PRO
0
110
Sinatra on PicoRuby ローカルでセルフホスト
bash0c7
0
110
re:Invent2026 事前勉強会 歴史と愉しみ方10分LT編
toshi_atsumi
0
160
Content Mapper APIの応用例~CSS Modules、言語ファイル~
uhyo
2
630
会社説明資料_最新版
demaecan
0
32k
Ebitengine製iOSアプリ公開ボタンを押す会
eiei114
0
110
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
350
The SEO identity crisis: Don't let AI make you average
varn
0
630
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Color Theory Basics | Prateek | Gurzu
gurzu
1
510
A Soul's Torment
seathinner
8
3.9k
Accessibility Awareness
sabderemane
1
290
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Docker and Python
trallard
47
4.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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