Created
August 24, 2018 14:10
-
-
Save Gocrazy/8127509aff2ea1c599b25c6a60ec759f to your computer and use it in GitHub Desktop.
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 | |
| class ViewController : UIViewController { | |
| override func loadView() { | |
| let view = UIView() | |
| view.backgroundColor = .white | |
| let box = UIView() | |
| box.frame = CGRect(x: 0, y: 0, width: 100, height: 100) | |
| box.backgroundColor = .blue | |
| view.addSubview(box) | |
| self.view = view | |
| } | |
| } | |
| PlaygroundPage.current.needsIndefiniteExecution = false | |
| PlaygroundPage.current.liveView = ViewController() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment