Sfoglia il codice sorgente

Merge branch 'develop' into feature/jeremy

南鑫林 5 anni fa
parent
commit
073a400fcc

+ 51 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoCoverCollectionCell.swift

@@ -744,6 +744,24 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
         return playStatusImageView
     }()
     
+    // 无数据のtipBackView
+    lazy var tipBackView: UIView = {
+        let tipBackView = UIView()
+        tipBackView.cornerRadius = 8
+        tipBackView.masksToBounds = true
+        tipBackView.backgroundColor = kRGBAColor(r: 0, g: 0, b: 0, a: 0.5)
+        return tipBackView
+    }()
+    
+    // 无数据のtipLabel
+    private lazy var tipLabel: UILabel = {
+        let tipLabel = UILabel()
+        tipLabel.text = "视频不见了"
+        tipLabel.textColor = kffffffColor
+        tipLabel.font = kRegularFont15
+        return tipLabel
+    }()
+    
     
     // MARK: - 播放动作
     func play() {
@@ -758,6 +776,39 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
     
     var videoItemMdl: CommunityVideoItemModel? {
         didSet {
+            // 数据不存在
+            if self.videoItemMdl?.id == nil {
+                self.backgroundColor = kffffffColor
+            
+                // 添加毛玻璃效果,需使用frame设置位置
+                let blurEffect = UIBlurEffect(style: .dark)
+                let blurEffectView = UIVisualEffectView(effect: blurEffect)
+                blurEffectView.frame = CGRect(x: CGFloat(0), y: 0, width: kScreenWidth, height: kScreenHeight)
+                addSubview(blurEffectView)
+                
+                navBackBtn.snp.makeConstraints { (make) in
+                    make.left.equalTo(5)
+                    make.top.equalTo(kSafeStatusBarHeight+2)
+                    make.size.equalTo(40)
+                }
+                bringSubviewToFront(navBackBtn)
+                
+                addSubview(tipBackView)
+                tipBackView.snp.makeConstraints { (make) in
+                    make.center.equalToSuperview()
+                    make.width.equalTo(120)
+                    make.height.equalTo(60)
+                }
+                
+                tipBackView.addSubview(tipLabel)
+                tipLabel.snp.makeConstraints { (make) in
+                    make.center.equalToSuperview()
+                }
+                
+                return
+            }
+            
+            // 根据视频数据填充UI
             if !(self.videoItemMdl?.video == nil || self.videoItemMdl?.video == "")  {
                 videoPlayView.assetURLString = self.videoItemMdl?.video
             }

+ 10 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCoverPick/Controller/AliyunCoverPickViewController.m

@@ -31,6 +31,16 @@
     });
 }
 
+- (void)viewWillAppear:(BOOL)animated {
+    //禁用侧滑手势
+    self.navigationController.interactivePopGestureRecognizer.enabled = NO;
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+    //禁用侧滑手势
+    self.navigationController.interactivePopGestureRecognizer.enabled = YES;
+}
+
 - (BOOL)prefersStatusBarHidden
 {
     return YES;

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m

@@ -766,6 +766,7 @@
     [_recorder applyFilter:effectFilter];
 }
 
+// 点击了录制按钮
 - (void)recordButtonRecordVideo{
     if (self.magicCameraView.backButton.enabled == NO) {
         _magicCameraView.hide = NO;
@@ -777,7 +778,6 @@
         return;
     }
     
-    // 点击了录制按钮
     if (self.hideSegmentBlock) {
         self.hideSegmentBlock(true);
     }

+ 13 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/Controller/PublishEditController.swift

@@ -53,6 +53,19 @@ class PublishEditController: BaseViewController {
         checkPublishButtonStatus()
     }
     
+    override func viewWillAppear(_ animated: Bool) {
+        // 禁用返回手势
+        if navigationController?.responds(to: #selector(getter: UINavigationController.interactivePopGestureRecognizer)) ?? false {
+            navigationController?.interactivePopGestureRecognizer?.isEnabled = false
+        }
+    }
+    
+    override func viewWillDisappear(_ animated: Bool) {
+        if navigationController?.responds(to: #selector(getter: UINavigationController.interactivePopGestureRecognizer)) ?? false {
+            navigationController?.interactivePopGestureRecognizer?.isEnabled = true
+        }
+    }
+    
     override func setupViews() {
         self.view.backgroundColor = kffffffColor