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
iOSDC_LT.pdf
Search
aboy
September 01, 2018
Programming
0
750
iOSDC_LT.pdf
iOSDC 2018 9/1(土)のルーキーズLT枠で発表した内容です
aboy
September 01, 2018
Tweet
Share
More Decks by aboy
See All by aboy
みんなでエラー監視するSRE夕会の効果_ゆるSRE勉強会1
yuyaabo
0
570
Go 1.19.1 security fix net/url JoinPath
yuyaabo
1
420
HTTPステータスコードが意図した値にならないとき Let's Go Talk #2
yuyaabo
1
440
OSS貢献を気軽にしたい Let's Go Talk #1
yuyaabo
2
540
困ったときが学びどき.pdf
yuyaabo
0
590
Build dynamic iOS apps with the Create ML framework の要約
yuyaabo
0
1.1k
fastlaneベースでTravis CIからBitriseに移行しました
yuyaabo
0
1.7k
Mixpanelのすゝめ
yuyaabo
0
2.7k
Use model deployment and security with Core MLの要約
yuyaabo
2
540
Other Decks in Programming
See All in Programming
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.2k
Functional Event Sourcing using Sekiban
tomohisa
0
110
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.4k
受け取る人から提供する人になるということ
little_rubyist
0
260
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
5
710
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
300
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
120
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
2k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
110
rails new flags - `rails new` のフラグから Rails を構成するコンポーネントの変遷をザックリ眺める
snaka
0
1.8k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
310
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
What's new in Ruby 2.0
geeforr
343
31k
Designing for humans not robots
tammielis
250
25k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
4 Signs Your Business is Dying
shpigford
180
21k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
380
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Visualization
eitanlees
145
15k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Transcript
ˏcosmeΞϓϦʹ͓͚Δ Textureͷ׆༻ 2018/09/01 iOSDC 2018 LT@aboy
ࣗݾհ • Ѩอ༑ • aboy/@suxisuxido • גࣜձࣾΞΠελΠϧ • iOSΤϯδχΞ/GoͰAPIΛॻ͖࢝ΊͨϚϯ
͢͜ͱ • ˏcosmeͱ͍͏εϚϗΞϓϦͷύϑΥʔϚϯ εվળͷҰͱͯ͠ɺTextureΛҰ෦ͷը໘Ͱ ݕূͯ͠ΈͨͷͰͭΒͭΒͱ͢
ˏcosmeΞϓϦͷͭ͘Γ • MVVM/Clean Architecture + RxSwift • جຊ 1view <=>
1view model • xib/storyboardʹΑΔviewཧ • جຊ 1view <=> 1xib/storyboard • AutoLayout/UIStackViewΰϦΰϦͬͯΔ
ͱ͋Δը໘ • iPod TouchͰಈ͔͢ • ͍͍ͩͨ30~45fps ಈը
αΫαΫಈ͘Α͏ʹ͍ͨ͠
None
Textureͱ • Pinterest͕࡞ͬͯΔඇಉظUIϑϨʔϜϫʔΫ • ϨΠΞτܭࢉόοΫάϥϯυεϨουͰඇಉظతʹߦ ΘΕΔ • ϨΠΞτશͯίʔυͰߦ͏ • CSS
FlexboxϥΠΫͳಠࣗͷϨΠΞτAPI • UIKitͰ͍͏ViewTextureͰNodeͱݺͿ • UIKitͷओཁͳView˓˓NodeʹϦϓϨΠε͞ΕͯΔ https://github.com/TextureGroup/Texture
Textureͷஔ͖͑
UIKit͔ΒTextureͷஔ͖͑ • UITableViewController -> ASViewController<ASTableNode> • ՃಡΈࠐΈ tableNode(_ tableNode: ASTableNode,
willBeginBatchFetchWith context: ASBatchContext)
UIKit͔ΒTextureͷஔ͖͑ • UITableViewCell -> ASCellNode • UIView -> ASDisplayNode •
ViewModelͦͷ··ར༻Մೳ • attributed stringisHiddenܥͷ ViewModelͰཧ͠ViewόΠϯσΟϯά
• ଞͷը໘Ͱ͍ͬͯΔڞ௨ύʔπ࠷ѱ UIViewͷϥοϓͰରԠ • ͨͩ͠ϝΠϯεϨου͕ΘΕΔ UIKit͔ΒTextureͷஔ͖͑ node = ASDisplayNode {
() -> UIView in let view = StarView(frame: CGRect.zero) view.configure(component.displayScore) //configure return view }
ϨΠΞτ override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec { let
baseStack = ASStackLayoutSpec.vertical() baseStack.spacing = 4.0 // UIStackView.Spacing var verticalElements: [ASLayoutElement] = [] if let messageNode = messageNode { verticalElements.append(messageNode) } verticalElements.append(contentNode) verticalElements.append(footerNode) baseStack.children = verticalElements return ASInsetLayoutSpec( insets: UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 0), child: baseStack ) }
Textureʹஔ͖͑ͨ݁Ռ…
UIKit Texture ಈը ಈը
UIKit Texture 30~45fps 50~55fps
Texture UIKit - Layer Backing - Subtree Rasterization View Hierarchy
͓ΘΓʹ • TextureΛͬͯύϑΥʔϚϯεΛ͋ΔఔվળͰ͖ͨ • ϓϩμΫγϣϯίʔυʹΈࠐΉ͔·ͩݕ౼த • xib/storyboard͔Βͷஔ͖͑ͦ͜·Ͱ͘͠ͳ͍ҹ • ը໘୯ҐͰஔ͖͑Ͱ͖ΔɻStackLayout͕ศརͰϥΫɻςΩετͷ৭ ϑΥϯτͷཧΛAttributedStringʹపఈͯ͠ΕͬͱϥΫͩͬͨ
• UIܥϥΠϒϥϦͬͯΔͱશஔ͖͑ͦ͠͏ • UIViewΛϥοϓͰ͖Δ͚ͲɺϝΠϯεϨου͕ΘΕΔͷͰϘτϧ ωοΫʹͳΔ͔