I am creating a playground live view of a navigation controller with a single view controller.
import UIKit
import PlaygroundSupport
final class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
title = "View Controller"
}
}
let viewController = ViewController()
let navigationController = UINavigationController(rootViewController: viewController)
PlaygroundPage.current.liveView = navigationController
The expected result is to have the navigation controller fully visible. Ideally, the frame would be an iPhone size, however, it's not necessary.
However, the result is clipped in the Playground Live View. See the following screenshot.
Is there a workaround to this behavior? Xcode version Version 12.5