Last active
November 17, 2016 03:22
-
-
Save keisei1092/0adb931bce7ac7885c2bd2f258330a08 to your computer and use it in GitHub Desktop.
PlaygroundでパッとViewだすやつ
This file contains 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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
let viewController = UIViewController() | |
viewController.view.backgroundColor = UIColor.white | |
let navigationController = UINavigationController(rootViewController: viewController) | |
navigationController.view.frame = CGRect(x: 0, y: 0, width: 320, height: 569) | |
let label = UILabel(frame: CGRect(x: 0, y: 50, width: 300, height: 100)) | |
label.text = "hoge" | |
viewController.view.addSubview(label) | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
PlaygroundPage.current.liveView = navigationController.view |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment