Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Using KSScreenshotManager
Chuck Shnider
June 16, 2013
Programming
0
76
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
300
Fun With Auto Layout
chucks
0
99
Introducing Skateway 2.0
chucks
0
17
Other Decks in Programming
See All in Programming
Running Laravel/PHP on AWS (AWS Builders Day Taiwan 2022)
dwchiang
0
130
Modern Android Developer ~ 안내서
pluu
1
560
Baseline Profilesでアプリのパフォーマンスを向上させる / Improve app performance with Baseline Profiles
numeroanddev
0
210
PythonユーザによるRust入門
rmizuta3
9
3k
You may not need JavaScript
simas
1
650
engineer
spacemarket
0
460
CUDA高速化セミナーvol.1 ~画像処理アルゴリズムの高速化~
fixstars
3
170
GitHubのユーザー名を変更した後のあれこれ
tahia910
0
120
Jetpack Compose best practices 動画紹介 @GoogleI/O LT会
takakitojo
0
150
設計ナイト2022 トランザクションスクリプト
shinpeim
11
2k
What's new in Jetpack / I/O Extended Japan 2022
star_zero
1
170
trocco® の品質を守る、とても普通な取り組み
kekekenta
0
350
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
19
1.2k
Designing for humans not robots
tammielis
241
23k
Clear Off the Table
cherdarchuk
79
280k
A Tale of Four Properties
chriscoyier
149
21k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
7
1.1k
The World Runs on Bad Software
bkeepers
PRO
57
5.3k
Teambox: Starting and Learning
jrom
122
7.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
396
62k
Building a Scalable Design System with Sketch
lauravandoore
447
30k
GraphQLとの向き合い方2022年版
quramy
16
8.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
37
3.2k
Thoughts on Productivity
jonyablonski
43
2.3k
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