1

我想截取 UIImageView 的屏幕截图,但问题是我希望它的宽度是原始尺寸的两倍。一些忠告?

这是我当前的代码:

UIGraphicsBeginImageContext(myImageView.bounds.size);
[myImageView.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();             
UIGraphicsEndImageContext();   
4

1 回答 1

0

我相信您可以UIGraphicsBeginImageContextWithOptions将比例选项设置为 2。

于 2012-12-30T16:27:16.490 回答