Skip to content

Instantly share code, notes, and snippets.

@keisei1092
Last active November 17, 2016 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keisei1092/0adb931bce7ac7885c2bd2f258330a08 to your computer and use it in GitHub Desktop.
Save keisei1092/0adb931bce7ac7885c2bd2f258330a08 to your computer and use it in GitHub Desktop.
PlaygroundでパッとViewだすやつ
//: 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