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
250
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.2k
Other Decks in Technology
See All in Technology
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
480
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
Can We Measure Developer Productivity?
ewolff
1
150
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
460
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
230
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
AGIについてChatGPTに聞いてみた
blueb
0
130
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Side Projects
sachag
452
42k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Navigating Team Friction
lara
183
14k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Agile that works and the tools we love
rasmusluckow
327
21k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Rails Girls Zürich Keynote
gr2m
94
13k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Designing for Performance
lara
604
68k
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