【发布时间】:2013-04-24 05:32:18
【问题描述】:
我希望我的 WebView 保存为任何格式的图像或 pdf,
我尝试使用代码保存网页:
UIGraphicsBeginImageContext(WebPage.frame.size);
[WebPage.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
但我得到了可见的部分..
我想知道如何获取整个网页图像或苹果人如何进行空中打印以便可以打印整个网页。我不想知道“AirPrint 功能”我想知道如何使用 iPhone 获取网页图像..
因为我对 iOS 开发比较陌生。
谁能帮我保存网页的工作代码?
【问题讨论】:
标签: iphone ios objective-c ios5 ios4