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
760
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
580
Go 1.19.1 security fix net/url JoinPath
yuyaabo
1
430
HTTPステータスコードが意図した値にならないとき Let's Go Talk #2
yuyaabo
1
450
OSS貢献を気軽にしたい Let's Go Talk #1
yuyaabo
2
560
困ったときが学びどき.pdf
yuyaabo
0
600
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
550
Other Decks in Programming
See All in Programming
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
960
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
960
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
130
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
300
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
190
Go の GC の不得意な部分を克服したい
taiyow
3
840
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
350
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
450
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
260
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
730
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
400
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Typedesign – Prime Four
hannesfritz
40
2.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
How STYLIGHT went responsive
nonsquared
96
5.2k
Become a Pro
speakerdeck
PRO
26
5k
Embracing the Ebb and Flow
colly
84
4.5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Speed Design
sergeychernyshev
25
680
Scaling GitHub
holman
459
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ΛϥοϓͰ͖Δ͚ͲɺϝΠϯεϨου͕ΘΕΔͷͰϘτϧ ωοΫʹͳΔ͔