Questions tagged «image-capture»

17
如何在不损失视网膜显示质量的情况下将UIView捕获到UIImage
我的代码在正常设备上工作正常,但在视网膜设备上创建了模糊的图像。 有人知道我的问题的解决方案吗? + (UIImage *) imageWithView:(UIView *)view { UIGraphicsBeginImageContext(view.bounds.size); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage * img = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return img; }
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.