我有一个uiimageview
即600x600和uitexview
加载到一个200x200的视图。将uiview保存为指定尺寸
我想将此uiview
导出为600x600,与uiimageview
大小相同。
但是,如果我使用下面的代码,我只能生成400x400的大小,这就是uiview
的视网膜大小。
有没有我可以实现这个目标的任何代码?
UIGraphicsBeginImageContextWithOptions(outputView.bounds.size, outputView.opaque, 2);
[outputView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
你尝试对outputView应用转换吗?即'outputView.transform = CGAffineTransformMakeScale(1.5,1.5);' – mvds