Guest User

Untitled

a guest
Oct 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. import UIKit
  2.  
  3. class RootViewController: UIViewController {
  4. //MARK: Properties
  5. let label = UILabel(frame: .zero)
  6.  
  7. //MARK: Lifecycle
  8. override func viewDidLoad() {
  9. super.viewDidLoad()
  10. //Set up label
  11. self.label.translatesAutoresizingMaskIntoConstraints = false
  12. self.label.textAlignment = .center
  13. self.label.font = IconFont().iconFont(50)
  14. self.label.text = IconFont().arrow_right
  15. self.label.textColor = UIColor.red
  16. //Set up view
  17. self.view.addSubview(self.label)
  18. self.view.backgroundColor = UIColor.white
  19. self.label.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 0).isActive = true
  20. self.label.rightAnchor.constraint(equalTo: self.view.rightAnchor, constant: 0).isActive = true
  21. self.label.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0).isActive = true
  22. self.label.leftAnchor.constraint(equalTo: self.view.leftAnchor, constant: 0).isActive = true
  23. }
  24.  
  25. //MARK: Functions
  26.  
  27.  
  28. }
Add Comment
Please, Sign In to add comment