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.8k
文字列をコピーできるスクリーンショットを作る/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
1.9k
UIViewで光の三原色の混ざり合いを表現したい / potatotips 75 Blend Mode
endoumari
1
300
ZOZOが採用しているiOSのアーキテクチャについて/zozo-tech-meetup8-ios-architecture
endoumari
0
2.4k
Dribbbleで見つけたコンセプトデザインを実装/potatotips-56-concept-design
endoumari
2
650
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
The Rise of LLMOps
asei
7
1.7k
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
AIチャットボット開発への生成AI活用
ryomrt
0
170
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
890
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
The Cult of Friendly URLs
andyhume
78
6k
Docker and Python
trallard
40
3.1k
Fireside Chat
paigeccino
34
3k
GraphQLとの向き合い方2022年版
quramy
43
13k
Writing Fast Ruby
sferik
627
61k
For a Future-Friendly Web
brad_frost
175
9.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Embracing the Ebb and Flow
colly
84
4.5k
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