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
520
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
280
In-App Purchase / Subscription with StoreKit
worlddowntown
3
3k
20150225_iqon.pdf
worlddowntown
0
80
ios_push_local_notification
worlddowntown
0
130
iqon_ios_growth_hack
worlddowntown
3
4.3k
Other Decks in Technology
See All in Technology
“プロダクトを好きになれるか“も QAエンジニア転職の大事な判断基準だと思ったの
tomodakengo
0
130
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
770
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
12k
Amazon Q Developer for GitHubとAmplify Hosting でサクッとデジタル名刺を作ってみた
kmiya84377
0
2.7k
讓測試不再 BB! 從 BDD 到 CI/CD, 不靠人力也能 MVP
line_developers_tw
PRO
0
150
VCpp Link and Library - C++ breaktime 2025 Summer
harukasao
0
130
エンジニア採用から始まる技術広報と組織づくり/202506lt
nishiuma
8
1.6k
ユーザーのプロフィールデータを活用した推薦精度向上の取り組み
yudai00
0
290
AIコーディング新時代を生き残るための試行錯誤 / AI Coding Survival Guide
tomohisa
9
12k
(新URLに移行しました)FASTと向き合うことで見えた、大規模アジャイルの難しさと楽しさ
wooootack
0
690
今からでも間に合う! 生成AI「RAG」再入門 / Re-introduction to RAG in Generative AI
hideakiaoyagi
1
160
Workflows から Agents へ ~ 生成 AI アプリの成長過程とアプローチ~
belongadmin
2
140
Featured
See All Featured
Producing Creativity
orderedlist
PRO
346
40k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Docker and Python
trallard
44
3.4k
Statistics for Hackers
jakevdp
799
220k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
The Invisible Side of Design
smashingmag
299
51k
Building Adaptive Systems
keathley
43
2.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
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