Last active
December 21, 2016 08:45
-
-
Save andresbrun/137a95105cdec26dd327bc8c52d525ec to your computer and use it in GitHub Desktop.
Create easily a view in Playground to play with
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
let containerView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 320.0, height: 480.0)) | |
// Play with containerView | |
let targetView = UIView(frame: CGRect(x: containerView.bounds.midX, | |
y: containerView.bounds.midY, | |
width: 50.0, | |
height: 50.0)) | |
containerView.addSubview(targetView) | |
PlaygroundPage.current.liveView = containerView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment