Skip to content

Instantly share code, notes, and snippets.

@romaonthego
Created July 8, 2014 16:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romaonthego/236d670e2d986c61f566 to your computer and use it in GitHub Desktop.
Save romaonthego/236d670e2d986c61f566 to your computer and use it in GitHub Desktop.
self.errorView = {
let view = UIView()
view.backgroundColor = UIColor.redColor()
view.addSubview({
self.errorLabel = {
let label = UILabel()
label.textAlignment = .Center
label.backgroundColor = UIColor.clearColor()
return label
}()
return self.errorLabel
}())
return view
}()
self.view.addSubview(self.errorView)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment