I'm creating a screenshot of a UIView currently displayed. I faced with an issue when controls are distorted and stretched for a moment (0.2-0.5 sec) during this process. It is reproduced for iPhone 6, 6+ ONLY.
my simple code is here (Xamarin.iOS):
public UIImage CreateScreenshotImage()
{
UIView rootView = UIApplication.SharedApplication.KeyWindow.RootViewController.View;
if (rootView != null)
{
var bounds = rootView.Bounds;
UIGraphics.BeginImageContextWithOptions(bounds.Size, false, 0);
**//here distortion starts, I can clearly see it in the DEBUG mode**
rootView.DrawViewHierarchy(bounds, true);
var screenshotImage = UIGraphics.GetImageFromCurrentImageContext();
UIGraphics.EndImageContext();
return screenshotImage;
}
return null;
}
I don't believe it is related to Xamarin so it should be the same issue for native iOS app as well.
What could be the reason?
Try with this: