截屏的时候uinavigationBar上的segmentCon
2016-07-25 本文已影响17人
641305d5cd60
-(UIImage*)getScreenShotForView:(UIView*)view{
UIGraphicsBeginImageContext(view.bounds.size);[[[[UIApplicationsharedApplication]windows]objectAtIndex:0]drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];// Set To YESUIImage*image=UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();
returnimage;
}
截取window上的图片