TestViewController.swift 460 B

123456789101112131415161718
  1. //
  2. // TestViewController.swift
  3. // fltbdface
  4. //
  5. // Created by RandyWei on 2020/4/21.
  6. //
  7. import Foundation
  8. class TestViewController: UIViewController {
  9. override func viewWillAppear(_ animated: Bool) {
  10. let text = UILabel()
  11. text.frame = CGRect(x: 50, y: 50, width: 100, height: 100)
  12. text.text = "UILabel"
  13. self.view.addSubview(text)
  14. self.view.backgroundColor = UIColor(red: 255, green: 0, blue: 0, alpha: 1)
  15. }
  16. }