Skip to content

Commit

Permalink
Put the svaffolding code back into Viewcontroller.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hyche committed Aug 13, 2017
1 parent 64bd9d1 commit e766e87
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,27 @@ import UIKit

class ViewController: UIViewController {

private let rootStackView = UIStackView(frame: .zero)

override func viewDidLoad() {
super.viewDidLoad()

// Add your code here
view.backgroundColor = UIColor.white

// Set up the root stack view
rootStackView.translatesAutoresizingMaskIntoConstraints = false
rootStackView.axis = .vertical
rootStackView.alignment = .fill
rootStackView.spacing = 8.0

// Add it to the view hierarchy and anchor it
view.addSubview(rootStackView)
rootStackView.leadingAnchor.constraint(equalTo: view.layoutMarginsGuide.leadingAnchor).isActive = true
rootStackView.trailingAnchor.constraint(equalTo: view.layoutMarginsGuide.trailingAnchor).isActive = true
rootStackView.topAnchor.constraint(equalTo: topLayoutGuide.bottomAnchor, constant: 20.0).isActive = true
bottomLayoutGuide.topAnchor.constraint(equalTo: rootStackView.bottomAnchor, constant: 20.0).isActive = true

// Add stuff to the stack view here.


}
Expand Down

0 comments on commit e766e87

Please sign in to comment.