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
Using KSScreenshotManager
Search
Chuck Shnider
June 16, 2013
Programming
0
87
Using KSScreenshotManager
Slides from my talk at Ottawa Cocoaheads on March 14, 2013.
Chuck Shnider
June 16, 2013
Tweet
Share
More Decks by Chuck Shnider
See All by Chuck Shnider
A look back at GameDev on Apple II
chucks
0
570
Fun With Auto Layout
chucks
0
120
Introducing Skateway 2.0
chucks
0
45
Other Decks in Programming
See All in Programming
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
210
Create a website using Spatial Web
akkeylab
0
310
関数型まつりレポート for JuliaTokai #22
antimon2
0
160
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
620
NPOでのDevinの活用
codeforeveryone
0
650
C++20 射影変換
faithandbrave
0
560
RailsGirls IZUMO スポンサーLT
16bitidol
0
130
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
880
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
530
ニーリーにおけるプロダクトエンジニア
nealle
0
710
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
290
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
RailsConf 2023
tenderlove
30
1.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Visualization
eitanlees
146
16k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
A better future with KSS
kneath
239
17k
Transcript
KSScreenshotManager Chuck Shnider twi er: @cshnider ∑
It starts small enough…
None
None
None
None
We’re Gonna Need a Bigger Slide…
None
Production Work
Heaven forbid you have to update them later!
KSScreenshotManager wri en by Kent Sutherland from Flexibits twi er:
@KSuther
@KSuther
h ps://github.com/ksuther/KSScreenshotManager Open-Source
KSScreenshotManager •Make your code generate the screenshots •Fully-Automated •Runnable from
scripting environments •Sample Python Script included •Uses “WaxSim” to drive the iOS Simulator
Like Test Automation •Not “For Free” •Cheaper to repeat over
time •Effort scales more slowly than manual screenshots
Modifying Your Code •WARNING Private API Usage! •Make sure none
of this ships to the AppStore •Conditional Compile and perhaps use a new target
Modifying Your Code •Add KSScreenshotManager and KSScreenshotAction.h / .m to
your project. #de ne CREATING_SCREENSHOTS
Modifying Your Code •Create a subclass of KSScreenshotManager •Override -(void)setupScreenshotActions;
setupScreenshotActions •Create instances of KSScreenshotAction •block-based API with optional cleanup
blocks •synch or async, status bar or no [self addScreenshotAction:newAction];
KSScreenshotAction block •Get the app to the correct state •Cheat
as necessary •Fake Data, Mock Objects, etc. •Private APIs, both app and OS
AppDelegate Changes #if CREATING_SCREENSHOTS dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 *
NSEC_PER_SEC)); dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ MyScreenshotManager *screenshotManager = [[MyScreenshotManager alloc] init]; [screenshotManager setTableViewController:viewController]; [screenshotManager takeScreenshots]; }); #endif
Demo