我正在使用此代码对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;