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
740
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
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
CSC509 Lecture 11
javiergs
PRO
0
180
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
230
イベント駆動で成長して委員会
happymana
1
330
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
How STYLIGHT went responsive
nonsquared
95
5.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
420
Designing for humans not robots
tammielis
250
25k
Visualization
eitanlees
145
15k
Bash Introduction
62gerente
608
210k
How GitHub (no longer) Works
holman
310
140k
A designer walks into a library…
pauljervisheath
204
24k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Building Your Own Lightsaber
phodgson
103
6.1k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
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ΛϥοϓͰ͖Δ͚ͲɺϝΠϯεϨου͕ΘΕΔͷͰϘτϧ ωοΫʹͳΔ͔