Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code-only UI Demonstration: ViewController
class MasterViewController: UIViewController {
var activityIndicatorView: UIActivityIndicatorView = UIActivityIndicatorView()
var baseView: UIView = UIView()
override func viewDidLoad() {
super.viewDidLoad()
baseView.frame = CGRect.zero;
baseView.translatesAutoresizingMaskIntoConstraints = false
let viewsDictionary = ["view": baseView]
view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat(
"H:|-0-[view]-0-|", options: [], metrics: nil, views: viewsDictionary))
view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat(
"V:|-0-[view]-0-|", options: [], metrics: nil, views: viewsDictionary))
self.view.addSubview(tableView)
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment