美文网首页
截屏的时候uinavigationBar上的segmentCon

截屏的时候uinavigationBar上的segmentCon

作者: 641305d5cd60 | 来源:发表于2016-07-25 14:33 被阅读17次

-(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上的图片

相关文章

网友评论

      本文标题:截屏的时候uinavigationBar上的segmentCon

      本文链接:https://www.haomeiwen.com/subject/tbigjttx.html