屏幕截图功能源码

olxbz76257 11 0 ZIP 2021-04-27 17:04:11

一款不错的屏幕截图功能源码,主要我们点击按钮进行截屏操作了,同时也可以将截屏图像保存到相册中等功能,大家可以下载学习看看吧。 //获取当前屏幕内容 - (UIImage *)getNormalImage:(UIView *)view{ float width = [UIScreen mainScreen].bounds.size.width; float height = [UIScreen mainScreen].bounds.size.height; UIGraphicsBeginImageContext(CGSizeMake(width, height)); CGContextRef context = UIGraphicsGetCurrentContext(); [view.layer renderInContext:context]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; }

用户评论
请输入评论内容
评分:
暂无评论