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.1k
URLエンコードされた Shift_JISのデコードについて / iOSDC 2017 LT SJIS decode
endoumari
1
4.9k
Other Decks in Technology
See All in Technology
Exadata Database Service on Cloud@Customer セキュリティ、ネットワーク、および管理について
oracle4engineer
PRO
0
1.1k
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
9
120k
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
190
End of Barrel Files: New Modularization Techniques with Sheriff
rainerhahnekamp
0
230
AI機能の開発運用のリアルと今後のリアル
akiroom
0
170
ジョブマッチングサービスにおける相互推薦システムの応用事例と課題
hakubishin3
3
550
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
2
660
「視座」の上げ方が成人発達理論にわかりやすくまとまってた / think_ perspective_hidden_dimensions
shuzon
2
14k
What to do after `laravel new`
mattstauffer
0
120
生成AIの強みと弱みを理解して、生成AIがもたらすパワーをプロダクトの価値へ繋げるために実践したこと / advance-ai-generating
cyberagentdevelopers
PRO
1
210
全社横断データ活用推進のコツと その負債とのつき合い方
masatoshi0205
0
110
AWSコンテナ本出版から3年経った今、もし改めて執筆し直すなら / If I revise our container book
iselegant
18
4.2k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Facilitating Awesome Meetings
lara
49
6.1k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Code Review Best Practice
trishagee
64
17k
Rails Girls Zürich Keynote
gr2m
93
13k
Statistics for Hackers
jakevdp
796
220k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
RailsConf 2023
tenderlove
29
880
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Writing Fast Ruby
sferik
626
61k
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