Преглед изворни кода

Merge branch 'master' of https://git.yishihui.com/iOS/Introduce
合并代码

jsonwang пре 3 година
родитељ
комит
b67879867a

BIN
Introduce.xcodeproj/project.xcworkspace/xcuserdata/harry.xcuserdatad/UserInterfaceState.xcuserstate


+ 3 - 0
Introduce/Record/INIntroduceController.swift

@@ -106,6 +106,9 @@ class INIntroduceController: BFBaseViewController {
 
         let controller = INVideoExportController()
         controller.export.data = recordScreenVC.itemModels
+        controller.export.originSoundVolumn = recordScreenVC.noSpeakVolume
+        controller.export.originSoundInRecordVolumn = recordScreenVC.haveSpeakVolume
+
         navigationController?.pushViewController(controller, animated: true)
     }
 }

+ 8 - 1
Introduce/Record/INPhotoVideosController.swift

@@ -63,6 +63,7 @@ class INPhotoVideosController: BFBaseViewController {
         choseLocalAllBtn.titleLabel?.font = UIFont.systemFont(ofSize: 17, weight: .medium)
         choseLocalAllBtn.addCorner(corner: 6)
         choseLocalAllBtn.tag = 10
+        choseLocalAllBtn.isSelected = true
         choseLocalAllBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
         return choseLocalAllBtn
     }()
@@ -75,7 +76,6 @@ class INPhotoVideosController: BFBaseViewController {
         choseLocalVideoBtn.titleLabel?.font = UIFont.systemFont(ofSize: 17, weight: .medium)
         choseLocalVideoBtn.addCorner(corner: 6)
         choseLocalVideoBtn.tag = 11
-        choseLocalVideoBtn.isSelected = true
         choseLocalVideoBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
         return choseLocalVideoBtn
     }()
@@ -103,6 +103,7 @@ class INPhotoVideosController: BFBaseViewController {
     lazy var photoMaterialVc: BFPhotosMaterialController = {
         let vc = BFPhotosMaterialController()
         vc.maxChoseNum = 20
+        vc.msgType = .all
         vc.view.backgroundColor = .black
         vc.updateFrame(newFrame: CGRect(x: 0, y: navHeadImageView?.bottomY ?? 0, width: cScreenWidth, height: cScreenHeigth - cDevice_iPhoneTabBarHei - (navHeadImageView?.bottomY ?? 0)))
         vc.selectedMaterialHandle = { [weak self] _, selectedPhotoData, _, _ in
@@ -172,6 +173,12 @@ class INPhotoVideosController: BFBaseViewController {
                 albumController.dismissCategoryView()
             }
         case 10, 11, 12: // 筛选全部图库
+            if (sender?.tag == choseLocalAllBtn.tag && choseLocalAllBtn.isSelected) ||
+                (sender?.tag == choseLocalVideoBtn.tag && choseLocalVideoBtn.isSelected) ||
+                (sender?.tag == choseLocalImageBtn.tag && choseLocalImageBtn.isSelected) {
+                return
+            }
+                    
             choseLocalAllBtn.isSelected = sender?.tag == 10
             choseLocalVideoBtn.isSelected = sender?.tag == 11
             choseLocalImageBtn.isSelected = sender?.tag == 12

+ 7 - 3
Introduce/Record/INRecorderController.swift

@@ -188,9 +188,13 @@ class INRecorderController: BFBaseViewController {
     }
 
     @objc func addVideo() {
-        let vc = INPhotoVideosController()
-        vc.hidesBottomBarWhenPushed = true
-        navigationController?.pushViewController(vc, animated: true)
+        if (getUserDefaults(key: "welcomeViewisshow") == nil) {
+            welcomeView.isHidden = false
+        }else{
+            let vc = INPhotoVideosController()
+            vc.hidesBottomBarWhenPushed = true
+            navigationController?.pushViewController(vc, animated: true)
+        }
     }
 }
 

+ 10 - 4
Introduce/Record/INVideoExportController.swift

@@ -21,9 +21,15 @@ class INVideoExportController: BFBaseViewController {
     var hasSaveOnly = false
     var saveAllUlr = URL(fileURLWithPath: "aaa")
     var saveOnlyUlr = URL(fileURLWithPath: "aaa")
-    var isExporting = false
+    var isExporting = false {
+        didSet {
+            if isExporting {
+                avplayer.pause()
+            }
+        }
+    }
 
-    // 播放进度
+    // 预览播放进度
     lazy var progreddL: UILabel = {
         let l = UILabel(frame: CGRect(x: 0, y: cDevice_iPhoneStatusBarHei, width: cScreenWidth, height: 14))
         l.textAlignment = .center
@@ -231,7 +237,7 @@ class INVideoExportController: BFBaseViewController {
 
         progressL.snp.makeConstraints { make in
             make.center.width.equalToSuperview()
-            make.height.equalTo(20)
+            make.height.equalTo(28)
         }
 
         progreddL.snp.makeConstraints { make in
@@ -288,12 +294,12 @@ class INVideoExportController: BFBaseViewController {
             cShowHUB(superView: nil, msg: "正在合成中。。。")
             return
         }
+        isExporting = true
         bottomView.isHidden = true
         progressView.isHidden = false
         progressL.isHidden = false
         progreddL.isHidden = true
         export.startExprot(synthesisAll: saveAllBtn.isSelected)
-        isExporting = true
         UIApplication.shared.isIdleTimerDisabled = true
     }