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
700
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
540
Go 1.19.1 security fix net/url JoinPath
yuyaabo
1
320
HTTPステータスコードが意図した値にならないとき Let's Go Talk #2
yuyaabo
1
370
OSS貢献を気軽にしたい Let's Go Talk #1
yuyaabo
2
480
困ったときが学びどき.pdf
yuyaabo
0
570
Build dynamic iOS apps with the Create ML framework の要約
yuyaabo
0
1k
fastlaneベースでTravis CIからBitriseに移行しました
yuyaabo
0
1.6k
Mixpanelのすゝめ
yuyaabo
0
2.6k
Use model deployment and security with Core MLの要約
yuyaabo
2
520
Other Decks in Programming
See All in Programming
Xcode 16のPreviewModifierと@Previewableを活用した効率的なプレビュー方法の考察
ojun9
2
160
しくじり先生 Image Matching Challenge 2024 編
goosehaaan
0
810
日付と正規化
megmogmog1965
0
140
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
20240706_CDKConf
takuyay0ne
0
1.2k
CSC307 Lecture 06
javiergs
PRO
0
360
ドメイン駆動設計の実践
masuda220
PRO
17
5.1k
Prompt FlowによるLLMアプリケーション開発
yuto2000
1
1k
CSC307 Lecture 13
javiergs
PRO
0
150
Polarsの成長: v0.14からv1.0までの変遷と今後の展望
zerebom
1
350
GraphQL はいいぞ! ~Laravel で学ぶ GraphQL 入門~
azuki
1
160
CSC307 Lecture 11
javiergs
PRO
0
240
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
23
1.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
121
18k
Faster Mobile Websites
deanohume
303
30k
In The Pink: A Labor of Love
frogandcode
139
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
28
2.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
What the flash - Photography Introduction
edds
65
11k
Building Adaptive Systems
keathley
34
2k
The MySQL Ecosystem @ GitHub 2015
samlambert
248
12k
Producing Creativity
orderedlist
PRO
340
39k
How GitHub (no longer) Works
holman
305
140k
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ΛϥοϓͰ͖Δ͚ͲɺϝΠϯεϨου͕ΘΕΔͷͰϘτϧ ωοΫʹͳΔ͔