Latest 1.0.0
Homepage https://github.com/toco/TOCScreenshot
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

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).

Usage

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];

Screenshot1

For other configuration options have a look into the header file.

Requirements

  • iOS 8

Installation

CocoaPods

TOCScreenshot is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "TOCScreenshot"

submodules

Add this repository as a submodule then add the two files from the TOCScreenshot folder to your project.

Author

Tobias Conradi

License

TOCScreenshot is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "TOCScreenshot",
    "version": "1.0.0",
    "summary": "TOCScreenshot is a simple helper to take screenshots in code. You can optionally crop the status bar region.",
    "description": "ttttttIn default configuration it saves the screenshots in a folder named with locale, screen size and screen resolution in the application documents directory.nttttttThe group path can be easily changed to e.g. save them in the project source path.nn",
    "homepage": "https://github.com/toco/TOCScreenshot",
    "screenshots": "https://raw.githubusercontent.com/toco/TOCScreenshot/master/Example/Screenshots/[email protected]/[email protected]",
    "license": "MIT",
    "authors": {
        "Tobias Conradi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/toco/TOCScreenshot.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "TOCScreenshot",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This