     
     lazy var stackView: UIStackView = {
         let view = UIStackView()
+        view.axis = .vertical
         view.backgroundColor = UIColor.brown
+        view.translatesAutoresizingMaskIntoConstraints = false
+
+        return view
+    }()
+    
+    lazy var scrollView: UIScrollView = {
+        let view = UIScrollView()
         return view
     }()
     

    
    lazy var apiClient: GitHubApi = GitHubApiClient()
    
    var users: [User] = []
    
    override func viewDidLoad() {
        super.viewDidLoad()
     
        [searchBar,stackView].forEach { [unowned self] (component: UIView) in
            component.translatesAutoresizingMaskIntoConstraints = false
            self.view.addSubview(component)
        }
        let constraints = [searchBarLayoutConstraints(), stackViewLayoutConstraints()]
        NSLayoutConstraint.activate(constraints.flatMap {$0})
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

        return [horizontalLeftConstrain, horizontalRightConstrain, pinTop]
    }
    
    fileprivate func scrollViewLayoutConstraints() -> [NSLayoutConstraint] {
        let horizontalLeftConstrain = NSLayoutConstraint(item: scrollView, attribute: .leadingMargin, relatedBy: .equal, toItem: view, attribute: .leadingMargin, multiplier: 1.0, constant: 0)
        let horizontalRightConstrain = NSLayoutConstraint(item: scrollView, attribute: .trailingMargin, relatedBy: .equal, toItem: view, attribute: .trailingMargin, multiplier: 1.0, constant: 0)
        let pinTop = NSLayoutConstraint(item: scrollView, attribute: .top, relatedBy: .equal,
                                        toItem: searchBar, attribute: .bottom, multiplier: 1.0, constant: 0)
        
        let pinBottom = NSLayoutConstraint(item: scrollView, attribute: .bottom, relatedBy: .equal,
                                           toItem: view, attribute: .bottom, multiplier: 1.0, constant: 0)
        return [horizontalLeftConstrain, horizontalRightConstrain, pinTop, pinBottom]
    }
}
