TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Tobias Conradi.
TOCScreenshot is a simple helper to take screenshots in code. You can optionally crop the status bar region.
In default configuration it saves the screenshots in a folder named with locale, screen size and screen resolution in the application documents directory. The group path can be changed to e.g. the project source path (see example project).
To run the example project, clone the repo, and open TOCScreenshot.xcworkspace from the Example directory first.
To crop the status bar region:
[TOCScreenshot setCropStatusBar:YES];
To take a screenshot and save it to a file:
[TOCScreenshot takeScreenshotNamed:@"ScreenshotName"];
To get a screenshot as a UIImage:
UIImage *screenshot = [TOCScreenshot screenshot];
For other configuration options have a look into the header file.
Add this repository as a submodule then add the two files from the TOCScreenshot folder to your project.
Tobias Conradi
TOCScreenshot is available under the MIT license. See the LICENSE file for more info.