Swift in playground on Mac OS. When the user clicks in a UItextfield, a keyboard spawns but it is very large compared to the view and only the first few keys are available.
Instead this line
PlaygroundPage.current.liveView = MyViewController()
Write this
let window = UIWindow(frame: CGRect(x: 0,
y: 0,
width: 768,
height: 1024))
let viewController = MyViewController()
window.rootViewController = viewController
window.makeKeyAndVisible()
PlaygroundPage.current.liveView = window
It works in Xcode 11