Explorar el Código

merge pre-master

wenweiwei hace 3 años
padre
commit
09f57a6c1f
Se han modificado 1 ficheros con 15 adiciones y 35 borrados
  1. 15 35
      Introduce/Record/INRecorderController.swift

+ 15 - 35
Introduce/Record/INRecorderController.swift

@@ -21,12 +21,9 @@ class INRecorderController: BFBaseViewController {
     
     lazy var addVideoBtn: UIButton = {
         let btn = UIButton(type: .custom)
+        //        btn.setTitle("Add", for: .normal)
         btn.setImage(UIImage(named: "add"), for: .normal)
-        btn.setTitle("从相册选择", for: .normal)
-        btn.setTitleColor(UIColor.init(white: 1, alpha: 0.5), for: .normal)
-        btn.titleLabel?.font = UIFont.systemFont(ofSize: 14)
         btn.addTarget(self, action: #selector(addVideo), for: .touchUpInside)
-        
         return btn
     }()
     
@@ -179,24 +176,19 @@ class INRecorderController: BFBaseViewController {
             view.addSubview(buildTimeLabel)
         }
       
-        view.addSubview(bottomView)
-
         view.addSubview(centerView)
+        view.addSubview(bottomView)
         centerView.snp.makeConstraints { make in
-            make.width.equalToSuperview()
+            make.width.equalTo(140)
             make.height.equalTo(209)
             make.center.equalToSuperview()
         }
         
-        centerView.addSubview(titleL)
-        centerView.addSubview(camaraBtn)
-        centerView.addSubview(photoBtn)
-        
-        camaraBtn.snp.makeConstraints { make in
-            make.width.equalTo(130)
-            make.height.equalTo(180)
-            make.centerX.equalToSuperview().offset(-71.5)
-            make.centerY.equalToSuperview()
+        centerView.addSubview(addVideoBtn)
+        addVideoBtn.snp.makeConstraints { make in
+            make.top.equalToSuperview().offset(5)
+            make.left.equalToSuperview().offset(5)
+            make.width.height.equalTo(130)
         }
         
         let l = UILabel()
@@ -210,12 +202,15 @@ class INRecorderController: BFBaseViewController {
         paragraphStyle.lineSpacing = 7
         paragraphStyle.alignment = .center
         attributedString.addAttribute(.paragraphStyle, value: paragraphStyle, range: .init(location: 0, length: l.text?.count ?? 0))
-
-        titleL.snp.makeConstraints { make in
-            make.bottom.equalTo(photoBtn.snp.top).offset(-50)
+        
+        l.attributedText = attributedString
+        l.sizeToFit()
+        l.numberOfLines = 2
+        l.snp.makeConstraints { make in
+            make.top.equalTo(addVideoBtn.snp.bottom).offset(19)
             make.centerX.equalToSuperview()
             make.width.equalTo(200)
-            make.height.equalTo(40)
+            make.height.equalTo(60)
         }
         
         //欢迎界面
@@ -270,16 +265,6 @@ class INRecorderController: BFBaseViewController {
         
     }
     
-    override func viewDidLayoutSubviews() {
-        var btn = camaraBtn
-        btn.imageEdgeInsets = UIEdgeInsets(top: -btn.titleLabel!.height - 2, left: 0, bottom: 0, right: -btn.titleLabel!.width)
-        btn.titleEdgeInsets = UIEdgeInsets(top: btn.imageView!.height + 8, left: -btn.imageView!.width, bottom: 0, right: 0)
-        
-        btn = photoBtn
-        btn.imageEdgeInsets = UIEdgeInsets(top: -btn.titleLabel!.height - 2, left: 0, bottom: 0, right: -btn.titleLabel!.width)
-        btn.titleEdgeInsets = UIEdgeInsets(top: btn.imageView!.height + 8, left: -btn.imageView!.width, bottom: 0, right: 0)
-    }
-    
     @objc func doneAction() {
         welcomeBackView.isHidden = true
         
@@ -312,11 +297,6 @@ class INRecorderController: BFBaseViewController {
         }
     }
     
-    @objc func cameraBtnAction() {
-        let vc = INIntroduceController()
-        navigationController?.pushViewController(vc, animated: true)
-    }
-    
     @objc func protocolClick(sender:UIButton) {
         var link: String?
         if sender.tag == 1 {