ViewController.swift 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // ViewController.swift
  3. // BFRecordScreenKit
  4. //
  5. // Created by harry on 11/23/2021.
  6. // Copyright (c) 2021 harry. All rights reserved.
  7. //
  8. import UIKit
  9. import BFMediaKit
  10. import BFRecordScreenKit
  11. import BFMaterialKit
  12. class ViewController: UIViewController {
  13. lazy var addVideoBtn:UIButton = {
  14. let btn = UIButton(type: .custom)
  15. // btn.setTitle("Add", for: .normal)
  16. btn.setImage(UIImage(named: "add"), for: .normal)
  17. btn.addTarget(self, action: #selector(addVideo), for: .touchUpInside)
  18. return btn
  19. }()
  20. override func viewDidLoad() {
  21. super.viewDidLoad()
  22. view.backgroundColor = .black
  23. self.navigationController?.isNavigationBarHidden = true
  24. view.addSubview(addVideoBtn)
  25. addVideoBtn.snp.makeConstraints { make in
  26. make.width.height.equalTo(170)
  27. make.center.equalToSuperview()
  28. }
  29. }
  30. override func didReceiveMemoryWarning() {
  31. super.didReceiveMemoryWarning()
  32. // Dispose of any resources that can be recreated.
  33. }
  34. @objc func addVideo(){
  35. let vc = PhotoVideoListController()
  36. vc.hidesBottomBarWhenPushed = true
  37. self.navigationController?.pushViewController(vc, animated: true)
  38. }
  39. }