I find this aspect of learning new things in Swift and Xcode very puzzling.
I cannot seem to decipher the actual code I need to write from what I read in the Apple API documentation; In my specific case: the API Reference for 'PlaygroundSupport', and the actual code I need, which is:
let containerView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 375.0, height: 667.0))
PlaygroundPage.current.liveView = containerView
Reading API documentation is a lot like reading a math textbook: you need to understand every word you're reading, or else you might miss what you need. In this case, inspecting that documentation, you'd probably check out the
PlaygroundPage class, and you'd see the
liveView property described as "The active live view in the assistant timeline". If you're not sure what a "live view" is, or what "the assistant timeline" is, then some further searching might be required. If you are aware of those terms, however, you should instantly recognize this as the property you're looking for!
Keep browsing through the documentation and make sure you understand enough of each method or property to definitely rule it out or look into it further. It can be overwhelming at first, but as you read the Swift iBook, follow tutorials, and continue to read the documentation, you will find yourself understanding more and more of what it says.