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 2020 LT PDF
Search
M"e
September 20, 2020
Technology
3
4.9k
文字列をコピーできるスクリーンショットを作る/iOSDC 2020 LT PDF
M"e
September 20, 2020
Tweet
Share
More Decks by M"e
See All by M"e
Hapticをカスタマイズしてみよう / ZOZO Tech Talk #6 Customize Haptic
endoumari
0
2k
UIViewで光の三原色の混ざり合いを表現したい / potatotips 75 Blend Mode
endoumari
1
310
ZOZOが採用しているiOSのアーキテクチャについて/zozo-tech-meetup8-ios-architecture
endoumari
0
2.5k
Dribbbleで見つけたコンセプトデザインを実装/potatotips-56-concept-design
endoumari
2
660
iOSエンジニアが悩んだUpボタンについて / 2017 potatotips 45 Up Button
endoumari
1
1.2k
URLエンコードされた Shift_JISのデコードについて / iOSDC 2017 LT SJIS decode
endoumari
1
5k
Other Decks in Technology
See All in Technology
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
110
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
5分でわかるDuckDB
chanyou0311
10
3.2k
Storage Browser for Amazon S3
miu_crescent
1
130
Password-less Journey - パスキーへの移行を見据えたユーザーの準備 @ AXIES 2024
ritou
3
1.4k
AIのコンプラは何故しんどい?
shujisado
1
190
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
160
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
1
230
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
170
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
169
14k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Adopting Sorbet at Scale
ufuk
73
9.1k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Gamification - CAS2011
davidbonilla
80
5.1k
Typedesign – Prime Four
hannesfritz
40
2.4k
RailsConf 2023
tenderlove
29
940
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Building Your Own Lightsaber
phodgson
103
6.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Transcript
จࣈྻΛίϐʔͰ͖Δ εΫϦʔϯγϣοτΛ࡞Δ גࣜձࣾZOZOςΫϊϩδʔζ ZOZOTOWN෦ ͑ΜͲ͏ Copyright © ZOZO Technologies, Inc.
© ZOZO Technologies, Inc. גࣜձࣾZOZOςΫϊϩδʔζ ZOZOTOWN෦ ͑ΜͲ͏ ▶ ZOZOTOWN /
iOSΞϓϦ։ൃ ▶ Twitter: re___you 2
© ZOZO Technologies, Inc. ͝ଘͰ͠ΐ͏͔ʁ 3
© ZOZO Technologies, Inc. 4 ͝ଘͰ͠ΐ͏͔ʁ - iOS 13͔ΒϑϧϖʔδͷεΫϦʔϯγϣοτ͕Մೳʹʂ
© ZOZO Technologies, Inc. 5 - iOS 13͔ΒϑϧϖʔδͷεΫϦʔϯγϣοτ͕Մೳʹʂ - αʔυύʔςΟΞϓϦରԠͰ͖Δ
͝ଘͰ͠ΐ͏͔ʁ
© ZOZO Technologies, Inc. 6 - iOS 13͔ΒϑϧϖʔδͷεΫϦʔϯγϣοτ͕Մೳʹʂ - αʔυύʔςΟΞϓϦରԠͰ͖Δ
- อଘܗࣜPDF ͝ଘͰ͠ΐ͏͔ʁ
© ZOZO Technologies, Inc. 7 εΫϦʔϯγϣοτͰจࣈΛ ίϐʔݕࡧͰ͖Δɻ ͦ͏ɺPDFͳΒͶɻ
© ZOZO Technologies, Inc. 8 ͦ͏ɺPDFͳΒͶ SafariͷϑϧϖʔδεΫϦʔϯγϣοτͰ จࣈྻͷίϐʔ&ݕࡧ͕Ͱ͖Δ
© ZOZO Technologies, Inc. 9
© ZOZO Technologies, Inc. 10 จࣈͷίϐʔ͕ Ͱ͖ͳ͍
© ZOZO Technologies, Inc. 11 จࣈΛίϐʔͰ͖ͳ͍ PDFͨͩͷը૾ͩ
© ZOZO Technologies, Inc. 12 ࠓ͢͜ͱ - ͳͥPDFจࣈྻΛίϐʔͰ͖Δͷ͔ʁ - ͳͥจࣈྻΛίϐʔͰ͖ͳ͔ͬͨͷ͔ʁ
- จࣈྻΛίϐʔͰ͖ΔPDFΛ࡞Δʹʁ
© ZOZO Technologies, Inc. 13 ࠓ͞ͳ͍͜ͱ - ϑϧϖʔδͷεΫϦʔϯγϣοτͷ࡞ʹ͍ͭͯ - TECH
BLOGʹߘ͍ͯ͠·͢ https://techblog.zozo.com/entry/ios_fullpage_screenshot
© ZOZO Technologies, Inc. ͳͥPDFจࣈྻΛ ίϐʔͰ͖Δͷ͔ʁ 14 Episode 1.
© ZOZO Technologies, Inc. 15 PDF จࣈใΛ͍࣋ͬͯΔ
© ZOZO Technologies, Inc. 16 PDFͷจࣈͷඳը จࣈใ
© ZOZO Technologies, Inc. 17 PDFͷத
© ZOZO Technologies, Inc. 18 PDFͷத
© ZOZO Technologies, Inc. 19 PDFͷத
© ZOZO Technologies, Inc. ͳͥจࣈྻΛ ίϐʔͰ͖ͳ͔ͬͨͷ͔ʁ 20 Episode 2.
© ZOZO Technologies, Inc. 21 จࣈใΛ ͍࣋ͬͯͳ͔ͬͨ
© ZOZO Technologies, Inc. 22 จࣈྻΛίϐʔͰ͖ͳ͍PDF ը૾ ը૾ ը૾ ը૾
© ZOZO Technologies, Inc. 23 จࣈྻΛίϐʔͰ͖ͳ͍PDF ը૾ ը૾ ը૾ ը૾
จࣈը૾ʹͳ͍ͬͯͨ
© ZOZO Technologies, Inc. 24 จࣈྻΛίϐʔͰ͖ͳ͍PDF ը૾ ը૾ ը૾ ը૾
ͳͥͳͷ͔ʁ
© ZOZO Technologies, Inc. iOSͷඳըʹ͍ͭͯ 25 - iOScontextʹΑͬͯඳըܗ͕ࣜมΘΔ - PDFContext
→ PDF - ImageContext → ը૾ https://developer.apple.com/library/archive/documentation/ GraphicsImaging/Conceptual/drawingwithquartz2d/dq_overview/ dq_overview.html
© ZOZO Technologies, Inc. 26 iOSͷඳըʹ͍ͭͯ PDFContextʹඳը͢Ε ͍͍ײ͡ʹͳΔͱࢥ͍ͬͯͨ
© ZOZO Technologies, Inc. 27 let renderer = UIGraphicsPDFRenderer(bounds: view.bounds)
let data = renderer.pdfData { context in context.beginPage() view.layer.render(in: context.cgContext) } UIGraphicsEndPDFContext() ίʔυΛݟͯ͠ΈΔ
© ZOZO Technologies, Inc. 28 let renderer = UIGraphicsPDFRenderer(bounds: view.bounds)
let data = renderer.pdfData { context in context.beginPage() view.layer.render(in: context.cgContext) } UIGraphicsEndPDFContext() ίʔυΛݟͯ͠ΈΔ ո͍͠
© ZOZO Technologies, Inc. 29 view.layer.render ԿΛඳը͍ͯ͠Δͷ͔ʁ
© ZOZO Technologies, Inc. 30 view.layer.render UIViewͷίϯςϯπͷ ϏοτϚοϓΛඳը͍ͯ͠Δ
© ZOZO Technologies, Inc. 31 UIViewͱCALayerͷؔ CALayer PDFContext drawRect render
ίϐʔͰ͖ͳ͍ PDF BitmapContext ϏοτϚοϓ UIView
© ZOZO Technologies, Inc. จࣈྻΛίϐʔͰ͖Δ PDFΛ࡞Δʹʁ 32 Episode 3.
© ZOZO Technologies, Inc. 33 ViewΛඳը͢Δ
© ZOZO Technologies, Inc. 34 UIView CALayer PDFContext drawRect render
ίϐʔͰ͖ͳ͍ PDF BitmapContext ϏοτϚοϓ PDFContext ίϐʔͰ͖Δ PDF viewΛඳը͢Δ
© ZOZO Technologies, Inc. 35 let renderer = UIGraphicsPDFRenderer(bounds: view.bounds)
let data = renderer.pdfData { context in context.beginPage() view.layer.render(in: context.cgContext) } UIGraphicsEndPDFContext() viewΛඳը͢Δ
© ZOZO Technologies, Inc. 36 let renderer = UIGraphicsPDFRenderer(bounds: view.bounds)
let data = renderer.pdfData { context in context.beginPage() view.draw(view.bounds) } UIGraphicsEndPDFContext() viewΛඳը͢Δ
© ZOZO Technologies, Inc. 37
© ZOZO Technologies, Inc. Կඳը͞Εͳ͍
© ZOZO Technologies, Inc. 39 let renderer = UIGraphicsPDFRenderer(bounds: view.bounds)
let data = renderer.pdfData { context in context.beginPage() view.draw(view.bounds) } UIGraphicsEndPDFContext() viewΛඳը͢Δ
© ZOZO Technologies, Inc. 40 let renderer = UIGraphicsPDFRenderer(bounds: view.bounds)
let data = renderer.pdfData { context in context.beginPage() view.subviews.forEach { $0.draw($0.bounds) } } UIGraphicsEndPDFContext() viewΛඳը͢Δ
© ZOZO Technologies, Inc. 41
© ZOZO Technologies, Inc. ϨΠΞτ͕ ࠨ্ʹີͰ͢
© ZOZO Technologies, Inc. 43 view.layer.render ϨΠΞτ എܠͷඳը ಁաॲཧ Ϙʔμͷඳը
AspectFill ରԠ
© ZOZO Technologies, Inc. 44 ͋ͱ࣮͢Δ͚ͩ
© ZOZO Technologies, Inc. 45
© ZOZO Technologies, Inc. 46 ৄ͍࣮͠GitHub https://github.com/EndouMari/ SampleScreenshot
None