|
@@ -171,7 +171,7 @@ class INPhotoVideosController: BFBaseViewController {
|
|
|
nextBtn.setTitle("下一步", for: .normal)
|
|
|
nextBtn.titleLabel?.font = UIFont.systemFont(ofSize: 12)
|
|
|
nextBtn.layer.cornerRadius = 4
|
|
|
- nextBtn.addTarget(self, action: #selector(rightBtnClick(sender:)), for: .touchUpInside)
|
|
|
+ nextBtn.addTarget(self, action: #selector(nextBtnClick(sender:)), for: .touchUpInside)
|
|
|
bottomV.addSubview(nextBtn)
|
|
|
}
|
|
|
|
|
@@ -226,8 +226,23 @@ class INPhotoVideosController: BFBaseViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- override func rightBtnClick(sender _: UIButton) {
|
|
|
+ @objc func nextBtnClick(sender _: UIButton) {
|
|
|
if let assets = chosedAsset, assets.count > 0 {
|
|
|
+ if let totalDura = chosedAsset?.reduce(0.0, { partialResult, phasset in
|
|
|
+ let dur = (phasset.mediaType == .video) ? phasset.duration : 0
|
|
|
+ return (partialResult ?? 0.0) + dur
|
|
|
+ }), totalDura > 7200{
|
|
|
+ let alertController = UIAlertController(title: nil, message: "素材总时长不能超过2小时", preferredStyle: UIAlertController.Style.alert)
|
|
|
+ let cancelAction = UIAlertAction(title: "确定", style: .default, handler: nil)
|
|
|
+ alertController.addAction(cancelAction)
|
|
|
+ self.present(alertController, animated: true, completion: nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+// 判断是否时icloud网络资源
|
|
|
+// let arr = assets.filter { asset in
|
|
|
+// asset.
|
|
|
+// }
|
|
|
+//
|
|
|
let vc = INIntroduceController()
|
|
|
vc.assets = assets
|
|
|
navigationController?.pushViewController(vc, animated: true)
|