APP名称:网页截图工具
运行环境:iOS 9 以及以上系统
开发工具:xcode
简介:
网页截图时一个款把整个网页转为图片的工具,便于保存和分享,只要输入网址,就能截图整个网页,生成长图,
功能:
1、网页录制、网站视频录制
2、网页一键保存成全图
3、高清大图,一键保存、分享
APP预览:


核心代码:
- (void)fullScreenshotCallback:(void(^)(UIImage *image))result{
CGPoint currentContentOffset = self.scrollView.contentOffset;
//截屏,添加snapshotView 到self 的父视图上
UIView *snapshotView = [self snapshotViewAfterScreenUpdates:YES];
snapshotView.xm_y = self.xm_y;
[self.superview addSubview:snapshotView];
self.scrollView.contentOffset = CGPointMake(0, 0);
CGRect frame = self.frame;
CGRect oldframe = frame;
frame.size = self.scrollView.contentSize;
self.frame = frame;
[self layoutIfNeeded];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
UIGraphicsBeginImageContextWithOptions(self.scrollView.contentSize, NO, 0.0);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[snapshotView removeFromSuperview];
self.frame = oldframe;
self.scrollView.contentOffset = currentContentOffset;
result(image);
});
}
下载地址:https://itunes.apple.com/cn/app/%E7%BD%91%E9%A1%B5%E6%88%AA%E5%85%A8%E5%9B%BE/id1434038562?mt=8
扫码下载App:

网友评论