Skip to content

Light class to create screenshots within your App

License

Notifications You must be signed in to change notification settings

SynappzMA/BDGScreenshot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BDGScreenshot

Light class to easily create screenshots within your App. You can switch between the older 'layer renderInContext' version or the newer 'drawViewHierarchyInRect' method. It also provides methods to return halfs of images in case you want to do some slick animations.

Installation using Cocoapods

pod 'BDGScreenshot'

Examples

/* Take screenshot of all windows (thus including keyboard) */
+(UIImage *)screenshotFromAllWindows;

/* Take screenshot of different types */
+(UIImage *)screenshotFromView:(UIView *)view;
+(UIImage *)screenshotFromView:(UIView *)view side:(ScreenshotSide)screenshotSide;
+(UIImage *)screenshotFromView:(UIView *)view renderInContext:(BOOL)renderInContext;
+(UIImage *)screenshotFromView:(UIView *)view afterScreenUpdates:(BOOL)afterScreenUpdates;
+(UIImage *)screenshotFromView:(UIView *)view renderInContext:(BOOL)renderInContext afterScreenUpdates:(BOOL)afterScreenUpdates;

/* Take screenshot and get halfs of the screenshot back in a NSArray */
+(NSArray *)screenshotVerticalsFromView:(UIView *)view;
+(NSArray *)screenshotHorizontalsFromView:(UIView *)view;

/* Simply divide the given image into halfs */
+(NSArray *)verticalHalfsFromImage:(UIImage *)image;
+(NSArray *)horizontalHalfsFromImage:(UIImage *)image;

About

Light class to create screenshots within your App

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 88.3%
  • Ruby 11.7%