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
690
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
3k
Flutter Accessibility
akihisasengoku
1
560
組織作りで大切にしていること
akihisasengoku
0
75
Bitriseのリファクタリング
akihisasengoku
1
180
Awaiting for New UI in iOS 13
akihisasengoku
0
1.3k
RxSwiftのテスト入門
akihisasengoku
1
940
Other Decks in Technology
See All in Technology
AWSで”最小権限の原則”を実現するための考え方 /20240722-ssmjp-aws-least-privilege
opelab
10
4.3k
「単なる OAuth 2.0 を認証に使うと、車が通れるほどのどでかいセキュリティー・ホールができる」のか検証してみた
terara
0
380
Amazon FSx for NetApp ONTAPのパフォーマンスチューニング要素をまとめてみた #cm_odyssey #devio2024
non97
0
220
開発と事業を繋ぐ!SREのオブザーバビリティ戦略 ~ Developers Summit 2024 Summer ~
leveragestech
0
620
コンテナ・K8s研修 - 後半 Kubernetes 基礎&ハンズオン【MIXI 24新卒技術研修】
mixi_engineers
PRO
1
120
LINE WORKSへ簡単通知!Incoming Webhookアプリの紹介
mmclsntr
0
110
コミュニティサービスに「あなたへ」フィードを リリースするまでの試行錯誤
takapy
1
140
AWSでRAGを作る法方
sonoda_mj
1
140
たくさん本を読んだけど 1年後には綺麗サッパリ!を乗り越えて 学習の鬼になるぞ👹
yum3
0
160
スレットハンティングについて知っておきたいこと
hacket
0
130
ギークの理想が7つ集まるエムスリーで夢を叶えよう - エムスリー株式会社
m3_engineering
1
260
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
93
13k
We Have a Design System, Now What?
morganepeng
46
7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
How GitHub Uses GitHub to Build GitHub
holman
471
290k
RailsConf 2023
tenderlove
16
720
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
23
1.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
90
47k
Designing for humans not robots
tammielis
247
25k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Fantastic passwords and where to find them - at NoRuKo
philnash
42
2.7k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.9k
Making Projects Easy
brettharned
111
5.7k
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