Przeglądaj źródła

preview hidden&&show disabled

Chris 5 lat temu
rodzic
commit
1d4866714b

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityAllCommentView.swift

@@ -31,6 +31,7 @@ class CommunityAllCommentView: FWPopupView {
     // 评论
     var communityPostCommentsModel : CommunityPostCommentsModel?
     var communityPostCommentModels = Array<CommunityPostCommentModel>()
+    var communityPostCommentModel : CommunityPostCommentModel?
     
     override init(frame: CGRect) {
         super.init(frame: frame)

+ 21 - 20
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/View/KSMediaPickerView.swift

@@ -63,7 +63,7 @@ open class KSMediaPickerView: UIView {
         }
         collectionView.scrollViewDidEndDraggingCallback = {[weak self] (scrollView, decelerate) in
             self?._collectionViewDidEndDragging(scrollView, decelerate: decelerate)
-        }        
+        }
     }
     
     override open func layoutSublayers(of layer: CALayer) {
@@ -159,25 +159,26 @@ open class KSMediaPickerView: UIView {
             _panBeginLocationY = pan.location(in: self).y
             break
         case .changed:
-            guard let baseY = _baseY else {
-                return
-            }
-            let location = pan.location(in: self)
-            let locationY = location.y
-            _isScrollDown = locationY > _panBeginLocationY
-            _isInGestureCorrespondingArea = _previewGestureCorrespondingArea != nil && _previewGestureCorrespondingArea!.contains(location)
-            if _isInGestureCorrespondingArea {
-                var previewFrame = previewView.frame
-                var y = locationY-previewFrame.size.height
-                if y >= baseY {
-                    y = baseY
-                }
-                previewFrame.origin.y = y
-                previewView.frame = previewFrame
-                
-                _previewGestureCorrespondingArea!.size.height = previewFrame.maxY+20.0
-            }
-            _panBeginLocationY = locationY
+            // preview视图收起展示逻辑
+//            guard let baseY = _baseY else {
+//                return
+//            }
+//            let location = pan.location(in: self)
+//            let locationY = location.y
+//            _isScrollDown = locationY > _panBeginLocationY
+//            _isInGestureCorrespondingArea = _previewGestureCorrespondingArea != nil && _previewGestureCorrespondingArea!.contains(location)
+//            if _isInGestureCorrespondingArea {
+//                var previewFrame = previewView.frame
+//                var y = locationY-previewFrame.size.height
+//                if y >= baseY {
+//                    y = baseY
+//                }
+//                previewFrame.origin.y = y
+//                previewView.frame = previewFrame
+//
+//                _previewGestureCorrespondingArea!.size.height = previewFrame.maxY+20.0
+//            }
+//            _panBeginLocationY = locationY
             break
         case .cancelled, .ended, .failed:
             guard _isInGestureCorrespondingArea, let baseY = _baseY else {