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
82
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
460
Fun With Auto Layout
chucks
0
110
Introducing Skateway 2.0
chucks
0
35
Other Decks in Programming
See All in Programming
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
250
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
210
Milestoner
bkuhlmann
1
410
PHPはいつから死んでいるかの調査
chiroruxx
1
350
Java 22 Overview
kishida
1
180
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
150
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
350
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
130
ONE WEDGE_company_guide
1wedge_one
0
430
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
120
データアナリストが行うDatabricksを活用したETLの自動化事例
shinoa
0
260
Goのエラースタックトレースの歴史と今後
sonatard
6
510
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
10 Git Anti Patterns You Should be Aware of
lemiorhan
647
58k
What's new in Ruby 2.0
geeforr
337
31k
Six Lessons from altMBA
skipperchong
20
3k
No one is an island. Learnings from fostering a developers community.
thoeni
15
2.1k
Automating Front-end Workflow
addyosmani
1355
200k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
Happy Clients
brianwarren
91
6.4k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Scaling GitHub
holman
457
140k
What the flash - Photography Introduction
edds
64
11k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
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