IOS _ screenshot and cropping, and iOS _ screenshot Cropping
Use Cases:
Code segment in iOS 7
// Use the context and crop by using the specified region. The template code-(void) screenShot {// view to be taken, that is, the view of the window root controller (which must not include the status bar, the Controller in ios7 contains the status bar by default.) BeyondViewController * beyondVC = self. view. window. rootViewController; // The total size of the background image CGSize = beyondVC. view. frame. size; // enable the context. After parameters are used, the source image (YES 0.0 high quality) uigraphicsbeginimagecontextwitexceptions (size, YES, 0.0) is captured. // key code for cropping, the range of the rectangle to crop CGRect rect = CGRectMake (0,-20, size. width, size. height + 20); // Note: renderInContext after iOS7: replaced by [beyondVC. view drawViewHierarchyInRect: rect afterScreenUpdates: NO]; // obtain the UIImage * snapshot = screenshot () from the context; // Add the captured image to the Image array [_ cutImages addObject: snapshot]; // remember, end context (remove stack top context) UIGraphicsEndImageContext ();}
Code snippets in iOS 6
// Use context, template code-(void) screenShot3 {// view to be taken, view of the window root controller (iOS6, default controller does not include the status bar) BeyondViewController * beyondVC = self. view. window. rootViewController; UIView * cutView = beyondVC. view; // enable the context. After parameters are used, the source image (YES 0.0 high quality) uigraphicsbeginimagecontextwitexceptions (cutView. frame. size, YES, 0.0); // render the layer of the cutView to the context [cutView. layer renderInContext: UIGraphicsGetCurrentContext ()]; // retrieve the UIImage * image = seek (); // Add the captured image to the image array [_ cutImages addObject: image]; // remember to end the context UIGraphicsEndImageContext ();}
Ios screenshot Software
Iphone itouch comes with the high-definition screenshot function. We recommend that you read more instructions,
Press and hold the home Key (the big button), and then press the power key (above the body) to see the screen flashing .. Screenshot taken successfully!
How to Use ipad4 regional screenshots?
Ios devices do not support area screenshots. You can only crop the entire screen after it is captured.