0

我正在使用此代码对UIScrollView. 我的问题是快照将始终采用 1.0f 缩放比例,UIScrollView而我想对UIScrollView. 我怎样才能做到这一点?

CGRect rect = [viewToCapture bounds];
UIGraphicsBeginImageContextWithOptions(rect.size,YES,0.0f);
CGContextRef context = UIGraphicsGetCurrentContext();
[viewToCapture.layer renderInContext:context];
UIImage *capturedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return capturedImage;
4

1 回答 1

0

您可以查看以下网址:

https://stackoverflow.com/a/15804107/1443976

于 2013-05-08T10:19:44.567 回答