How do you create an image from what is on the screen in iOS 13?
In iOS 12, this code worked:
UIGraphicsBeginImageContextWithOptions(view.frame.size, false, 0.0)
view.drawHierarchy(in: view.frame, afterScreenUpdates: true)
let myImage = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()
But in Xcode 11 using iOS 13 simulators, it generates a pixelated image with some text:
Anyone know what should be changed? Xcode 11 appears to be running the same Swift version as Xcode 10.2 (Swift 5).
Xcode 11.0 beta 2 (11M337n)
iOS 13.0 (17A5508l)