PlaygroundでViewControllerを表示する。
Assistant Editors を開いて、下記のようなコードで表示できます。
import UIKit import XCPlayground let window = UIWindow(frame: CGRect(x: 0, y: 0, width: 300, height: 300)) let viewController = UIViewController() viewController.view.backgroundColor = UIColor.greenColor() window.rootViewController = viewController window.makeKeyAndVisible() XCPlaygroundPage.currentPage.liveView = window XCPlaygroundPage.currentPage.needsIndefiniteExecution = true