Ver código fonte

评论完成

南鑫林 5 anos atrás
pai
commit
2a6bd3a4f9

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

@@ -167,6 +167,29 @@ class CommunityAllCommentView: FWPopupView {
         }
     }
     
+    /// 自定义评论View
+    class func communityAllCommentView(view:UIView? = nil,postId:Int, videoItemMdl: CommunityVideoItemModel) -> CommunityAllCommentView {
+        let commentView = CommunityAllCommentView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: kSafeTabBarHeight + 500))
+        commentView.attachedView = view
+        
+        commentView.configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
+        commentView.postId = postId
+        commentView.videoItemModel = videoItemMdl
+        let vProperty = FWPopupViewProperty()
+        vProperty.popupCustomAlignment = .bottomCenter
+        vProperty.popupAnimationType = .frame
+        vProperty.maskViewColor = UIColor(white: 0, alpha: 0.5)
+        vProperty.touchWildToHide = "0"
+        vProperty.popupViewEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
+        vProperty.animationDuration = 0.3
+        commentView.vProperty = vProperty
+        commentView.show()
+        commentView.disTransBlock = {
+            commentView.hide()
+        }
+        return commentView
+    }
+    
 }
 
 extension CommunityAllCommentView : UITableViewDelegate, UITableViewDataSource {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift

@@ -272,7 +272,7 @@ extension CommunityVideoListController {
     }
     
     func showCommentView(postId: Int, videoItemMdl: CommunityVideoItemModel) {
-       commentAlertSheetView =  AlertSheetView.commentAlertSheetView(postId: postId, videoItemMdl: videoItemMdl)
+        commentAlertSheetView = CommunityAllCommentView.communityAllCommentView(view:self.view,postId: postId, videoItemMdl: videoItemMdl)
     }
     
     /// 分享

+ 0 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishVideoRecorderController.swift

@@ -52,8 +52,6 @@ class PublishVideoRecorderController: BaseViewController {
     let maxDuration: CGFloat = 60.0
     let minDuration: CGFloat = 3.0
     
-    
-    
     override func viewDidLoad() {
         super.viewDidLoad()
         

+ 0 - 22
RainbowPlanet/RainbowPlanet/Tools/AlertSheetView/AlertSheetView.swift

@@ -113,28 +113,6 @@ class AlertSheetView: NSObject {
         }
     }
     
-    /// 自定义评论View
-    class func commentAlertSheetView(postId:Int, videoItemMdl: CommunityVideoItemModel) -> CommunityAllCommentView {
-        let commentView = CommunityAllCommentView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: kSafeTabBarHeight + 500))
-        commentView.configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
-        commentView.postId = postId
-        commentView.videoItemModel = videoItemMdl
-        
-        let vProperty = FWPopupViewProperty()
-        vProperty.popupCustomAlignment = .bottomCenter
-        vProperty.popupAnimationType = .frame
-        vProperty.maskViewColor = UIColor(white: 0, alpha: 0.5)
-        vProperty.touchWildToHide = "0"
-        vProperty.popupViewEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-        vProperty.animationDuration = 0.3
-        commentView.vProperty = vProperty
-        commentView.show()
-        commentView.disTransBlock = {
-            commentView.hide()
-        }
-        return commentView
-    }
-    
     
     /// 单个选择器
     class func sheetPickViewOneComponentsView(titles:[String],title:String,height:CGFloat,sureClosure:((_ row: Int,_ value:String) -> Void)?) {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Tools/KeyBoardCommentView/KeyBoardInputView.swift

@@ -117,9 +117,9 @@ class KeyBoardInputView: InputBarAccessoryView {
 
         padding = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14)
         middleContentViewPadding = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 10)
+        setRightStackViewWidthConstant(to: 60, animated: false)
         separatorLine.isHidden = true
         setMiddleContentView(inputTextView, animated: false)
-        
         keyboardManager.bind(inputAccessoryView: self)
         keyboardManager.on(event: KeyboardEvent.willHide) {
             [weak self] (KeyboardNotification) in