我正在使用此代码拍摄UIScrollView
的快照。我的问题是快照将始终采用UIScrollView
的1.0f缩放比例,而我想要快照UIScrollView
中的所有内容。我怎么能做到这一点?
CGRect rect = [viewToCapture bounds];
UIGraphicsBeginImageContextWithOptions(rect.size,YES,0.0f);
CGContextRef context = UIGraphicsGetCurrentContext();
[viewToCapture.layer renderInContext:context];
UIImage *capturedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return capturedImage;