INRecorderController.swift 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // INRecorderController.swift
  3. // Introduce
  4. //
  5. // Created by 胡志强 on 2021/11/29.
  6. // 首页
  7. import BFMaterialKit
  8. import BFRecordScreenKit
  9. import BFUIKit
  10. import Foundation
  11. import UIKit
  12. class INRecorderController: BFBaseViewController {
  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. lazy var bgView:UIImageView = {
  21. let bgView = UIImageView.init(frame: CGRect.init(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
  22. bgView.contentMode = .scaleAspectFit
  23. bgView.image = UIImage(named: "homebg")
  24. return bgView
  25. }()
  26. override func viewWillAppear(_ animated: Bool) {
  27. super.viewWillAppear(animated)
  28. hiddenNavigation()
  29. }
  30. override func viewDidLoad() {
  31. super.viewDidLoad()
  32. view.backgroundColor = .black
  33. view.addSubview(bgView)
  34. view.addSubview(addVideoBtn)
  35. addVideoBtn.snp.makeConstraints { make in
  36. make.width.height.equalTo(170)
  37. make.center.equalToSuperview()
  38. }
  39. let l = UILabel()
  40. l.text = "选择视频,开始讲解"
  41. l.textColor = .white
  42. l.font = UIFont.systemFont(ofSize: 16)
  43. l.textAlignment = .center
  44. view.addSubview(l)
  45. l.snp.makeConstraints { make in
  46. make.top.equalTo(addVideoBtn.snp.bottom)
  47. make.centerX.equalToSuperview()
  48. make.width.equalTo(200)
  49. make.height.equalTo(24)
  50. }
  51. }
  52. override func didReceiveMemoryWarning() {
  53. super.didReceiveMemoryWarning()
  54. // Dispose of any resources that can be recreated.
  55. }
  56. @objc func addVideo() {
  57. let vc = INPhotoVideosController()
  58. vc.hidesBottomBarWhenPushed = true
  59. navigationController?.pushViewController(vc, animated: true)
  60. }
  61. }