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
960
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iOSDC_LT.pdf
iOSDC 2018 9/1(土)のルーキーズLT枠で発表した内容です
aboy
September 01, 2018
More Decks by aboy
See All by aboy
生成AIで日々のエラー調査を進めたい
yuyaabo
0
1.1k
みんなでエラー監視するSRE夕会の効果_ゆるSRE勉強会1
yuyaabo
1
740
Go 1.19.1 security fix net/url JoinPath
yuyaabo
1
560
HTTPステータスコードが意図した値にならないとき Let's Go Talk #2
yuyaabo
1
570
OSS貢献を気軽にしたい Let's Go Talk #1
yuyaabo
2
660
困ったときが学びどき.pdf
yuyaabo
0
660
Build dynamic iOS apps with the Create ML framework の要約
yuyaabo
0
1.3k
fastlaneベースでTravis CIからBitriseに移行しました
yuyaabo
0
1.9k
Mixpanelのすゝめ
yuyaabo
0
3k
Other Decks in Programming
See All in Programming
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
210
AIが無かった頃の素敵な出会いの話
codmoninc
1
370
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
330
その節約、円になってますか?
isamumumu
1
670
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
3.7k
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
200
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
280
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
FDEが実現するAI駆動経営の現在地
gonta
2
250
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
160
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
380
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
250
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Navigating Weather and Climate Data
rabernat
0
440
The SEO identity crisis: Don't let AI make you average
varn
0
520
Building the Perfect Custom Keyboard
takai
2
830
The Curious Case for Waylosing
cassininazir
1
450
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Google's AI Overviews - The New Search
badams
0
1.1k
GitHub's CSS Performance
jonrohan
1033
470k
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ΛϥοϓͰ͖Δ͚ͲɺϝΠϯεϨου͕ΘΕΔͷͰϘτϧ ωοΫʹͳΔ͔