import UIKit
class HomeViewController: UIViewController {
private lazy var label: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.text = "Hello, World!"
label.textColor = .white
label.font = .systemFont(ofSize: 24.0, weight: .bold)
}()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
view.backgroundColor = .background
addSubviews()
setupConstraints()
}
private func addSubviews() {
view.addSubview(label)
}
private func setupConstraints() {
NSLayoutConstraint.activate([
label.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16),
label.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -16)
])
}
}