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
Live Renderingとの上手い付き合い方
Search
WorldDownTown
March 23, 2017
Technology
1
500
Live Renderingとの上手い付き合い方
『Gotanda.mobile #2』 での登壇資料
WorldDownTown
March 23, 2017
Tweet
Share
More Decks by WorldDownTown
See All by WorldDownTown
WWDC動画鑑賞会📹🍱を支える技術 / WWDC Video Lunch
worlddowntown
0
260
In-App Purchase / Subscription with StoreKit
worlddowntown
3
3k
20150225_iqon.pdf
worlddowntown
0
76
ios_push_local_notification
worlddowntown
0
110
iqon_ios_growth_hack
worlddowntown
3
4.3k
Other Decks in Technology
See All in Technology
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
3
260
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
300
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
13
3.7k
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
330
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
340
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
220
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
450
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Practical Orchestrator
shlominoach
186
10k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Designing Experiences People Love
moore
138
23k
The Invisible Side of Design
smashingmag
298
50k
Statistics for Hackers
jakevdp
796
220k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Why Our Code Smells
bkeepers
PRO
335
57k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Transcript
Live Renderingͱͷ ্ख͍͖߹͍ํ 2017/03/23 Gotanda.mobile #2 1
Keisuke Shoji @WorldDownTown VASILY, Inc. 2
Live Rendering ͱ 3
Live Rendering • 2014ʙ • Xcode 6 Ͱ Interaface Builder
ʹՃ͞Εͨػೳ 4
Ͱ͖Δ͜ͱ! • ผΫϥεʹΓग़ͨ͠ViewͷσβΠϯ ΛɺΞϓϦΛϏϧυͤͣʹϦΞϧλΠϜ Ͱ֬ೝͰ͖Δ 5
Ͱ͖Δ͜ͱ! • ผΫϥεʹΓग़ͨ͠ViewͷσβΠϯ ΛɺΞϓϦΛϏϧυͤͣʹϦΞϧλΠϜ Ͱ֬ೝͰ͖Δ ։ൃαΠΫϧͷϖʔε্͕͕ Δ㽉 6
Ͱ͖ͳ͍͜ͱ! • API௨৴ͷϨεϙϯεΛ͏߹ͳͲɺඇಉظͰͷσβΠϯө Ͱ͖ͳ͍ • ͦͷView͚ࣗͩͷಠࣗͷϥΠϑαΠΫϧΛ࣋ͭͷͰɺͦΕΛ ͑Δॲཧಈ͔ͳ͍ (UIApplicationDelegate, UIViewController ͷϝιο
υͳͲ) 7
@IBDesignable / @IBInspectable ͱ 8
@IBDesignable • Live Rendering Λ༗ޮʹ͢ΔͨΊ ͷΩʔϫʔυ • Interface BuilderͰΧελϜView ͷσβΠϯΛදࣔͰ͖ΔΑ͏ʹͳΔ
9
@IBInspectable • ΧελϜViewͷϓϩύςΟΛ InterfaceBuilderΛͷΠϯεϖΫλ ͰมߋͰ͖ΔΑ͏ʹͳΔ 10
Α͋͘Δ͍ํ • @IBDesignable Ͱఆٛͨ͠ΧελϜViewΛ࡞ • draw(_:) ͰσβΠϯΛ࣮ 11
12
σϝϦοτ! • ίʔυ্ ͱ Interface Builder ʹσβΠϯ࣮͕ࢄΒ Δ… • ඳըॲཧ͕ແ͍ͷʹ
draw(_:) ʹॻ͘ͷͪΐͬͱ… 13
σϝϦοτ! • ίʔυ্ ͱ Interface Builder ʹσβΠϯ࣮͕ࢄΒ Δ… (@IBInspectable Λ͍ग़͢ͱ༨ܭʹ)
• ඳըॲཧ͕ແ͍ϨΠΞτઃఆΛ draw(_:) ʹॻ͘ͷͪΐ ͬͱ… ↓ ίʔυଆʹدͤΑ͏! 14
⚠ίʔυʹσβΠϯΛدͤΔ্Ͱͷҙ⚠ 15
ΞϓϦ্ͷڍಈ 1.init?(coder:) 2.awakeFromNib() 3.layoutSubviews() 4.draw(_:) 16
Live Rendering ͷڍಈ 1.init(frame:) ⚠ 2.prepareForInterfaceBuilder() ⚠ 3.layoutSubviews() 4.draw(_:) awakeFromNib()
ʹϨΠΞτॲཧΛॻ͍͍ͯΔͱLive Rendering͞Εͳ͍ 17
ίʔυͷϨΠΞτΛөͤ͞Δʹ • awakeFromNib() • prepareForInterfaceBuilder() ͷ྆ํͰϨΠΞτॲཧΛݺͿ If you want to
share code between these methods, move that code to another method that you call 1 Xcode Help - http://help.apple.com/xcode/mac/8.0/#/devf60c1c514 18
19
σόοά! 1.Break PointΛଧ͓ͬͯ͘ 2.Interface Builder Λ։͘ 3.Editor → Debug Selected
Views 4.બͨ͠ViewͷϨϯμϦϯάॲཧ͕ Δ 5.Break PointͰॲཧ͕ࢭ·Δ 6.LLDBͰσόοά 20
RangeSeekSlider ↔ ൣғબ͢ΔͨΊͷUISliderϥΠΫϥΠ ϒϥϦ https://github.com/ WorldDownTown/RangeSeekSlider 21
·ͱΊ • Live RenderingͰΞϓϦΛϏϧυ͠ͳ͍ͰσβΠϯΛ֬ೝͰ ͖Δ • ίʔυͰ࣮ͨ͠σβΠϯLive RenderingͰදࣔͤ͞Δ͜ ͱ͕Ͱ͖Δ 22
͋Γ͕ͱ͏͍͟͝·ͨ͠ 23