このコードを使用して、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;