Skip to content

Instantly share code, notes, and snippets.

@aciidgh
Created December 4, 2015 20:56
Show Gist options
  • Save aciidgh/751ca432c7ea6de9cc88 to your computer and use it in GitHub Desktop.
Save aciidgh/751ca432c7ea6de9cc88 to your computer and use it in GitHub Desktop.
Use of unresolved identifier 'XCPlaygroundPage'
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
class VC: UIViewController {
let newView = UIView()
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
newView.frame = view.bounds
newView.backgroundColor = .redColor()
UIView.transitionFromView(view,
toView: newView,
duration: 3.0,
options: [.TransitionCurlUp],
completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .greenColor()
}
}
let vc = VC()
let currentPage = XCPlaygroundPage.currentPage
currentPage.needsIndefiniteExecution = true
currentPage.liveView = vc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment