Reputation: 101
I am instantiating a playground live view using the following code:
import UIKit
import PlaygroundSupport
let view = UIView()
view.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
view.backgroundColor = .white
PlaygroundPage.current.liveView = view
The live view that appears is stuck to the top of the screen and I can't change it's location by changing the x and y values of the frame. How do I get the view to move/center on my screen?
Photo of how it comes out:
Upvotes: 3
Views: 353