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
530
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
290
In-App Purchase / Subscription with StoreKit
worlddowntown
3
3k
20150225_iqon.pdf
worlddowntown
0
84
ios_push_local_notification
worlddowntown
0
140
iqon_ios_growth_hack
worlddowntown
3
4.3k
Other Decks in Technology
See All in Technology
How We Built a Secure Sandbox Platform for AI
flatt_security
1
110
クラウドネイティブ時代の 開発プロセス再設計 〜速さと品質を両立するには〜
moritamasami
0
110
ABEMAのCM配信を支えるスケーラブルな分散カウンタの実装
hono0130
4
1.1k
Progressive Deliveryで支える!スケールする衛星コンステレーションの地上システム運用 / Ground Station Operation for Scalable Satellite Constellation by Progressive Delivery
iselegant
1
210
メッセージ駆動が可能にする結合の最適化
j5ik2o
9
1.5k
グローバルなコンパウンド戦略を支えるモジュラーモノリスとドメイン駆動設計
kawauso
3
8.5k
学術的根拠から読み解くNotebookLMの音声活用法
shukob
0
400
AI エージェントを評価するための温故知新と Spec Driven Evaluation
icoxfog417
PRO
2
710
入社したばかりでもできる、 アクセシビリティ改善の第一歩
unachang113
2
350
AIエージェントによるエンタープライズ向けスライド検索!
shibuiwilliam
4
700
今すぐGoogle Antigravityを触りましょう
rfdnxbro
0
160
現地速報!Microsoft Ignite 2025 M365 Copilotアップデートレポート
kasada
2
1.7k
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
4 Signs Your Business is Dying
shpigford
186
22k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
KATA
mclloyd
PRO
32
15k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
How GitHub (no longer) Works
holman
315
140k
The Invisible Side of Design
smashingmag
302
51k
GraphQLとの向き合い方2022年版
quramy
49
14k
Rails Girls Zürich Keynote
gr2m
95
14k
What's in a price? How to price your products and services
michaelherold
246
12k
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