Created
October 5, 2019 05:14
-
-
Save laevandus/b00526239a92e018cc1dc919ee8977a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func loadView() { | |
self.view = UIView(frame: .zero) | |
let scrollView: UIScrollView = { | |
let scrollView = UIScrollView(frame: .zero) | |
scrollView.backgroundColor = .white | |
scrollView.translatesAutoresizingMaskIntoConstraints = false | |
return scrollView | |
}() | |
view.addSubview(scrollView) | |
NSLayoutConstraint.activate([ | |
scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor), | |
scrollView.trailingAnchor.constraint(equalTo: view.trailingAnchor), | |
scrollView.topAnchor.constraint(equalTo: view.topAnchor), | |
scrollView.bottomAnchor.constraint(equalTo: view.bottomAnchor) | |
]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment