Skip to content

Instantly share code, notes, and snippets.

@regnerjr
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save regnerjr/9e2e33dc358daf47a61a to your computer and use it in GitHub Desktop.

Select an option

Save regnerjr/9e2e33dc358daf47a61a to your computer and use it in GitHub Desktop.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
ErrorView.errorInView(self.view, animated: true)
}
}
class ErrorView: UIView {
class func errorInView(view:UIView, animted:Bool) -> ErrorView {
println("ERROR VIEW LOADED")
//let errorView = ErrorView(frame: view.bounds)
var errorView = ErrorView(frame: view.bounds)
errorView.backgroundColor = UIColor.greenColor()
errorView.opaque = false
view.addSubview(errorView)
return errorView
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment