|
@@ -10,6 +10,7 @@ import UIKit
|
|
|
import FWPopupView
|
|
|
import RxSwift
|
|
|
import RxCocoa
|
|
|
+import IQKeyboardManagerSwift
|
|
|
|
|
|
class CommunityAllCommentView: FWPopupView {
|
|
|
|
|
@@ -33,6 +34,8 @@ class CommunityAllCommentView: FWPopupView {
|
|
|
|
|
|
override init(frame: CGRect) {
|
|
|
super.init(frame: frame)
|
|
|
+ IQKeyboardManager.shared.enable = false
|
|
|
+ IQKeyboardManager.shared.enableAutoToolbar = false
|
|
|
self.backgroundColor = kf7f8faColor
|
|
|
|
|
|
addSubview(topView)
|
|
@@ -43,6 +46,7 @@ class CommunityAllCommentView: FWPopupView {
|
|
|
noCommentsLabel.isHidden = true
|
|
|
|
|
|
addSubview(tableView)
|
|
|
+ addSubview(commentInputView)
|
|
|
|
|
|
setupLayouts()
|
|
|
}
|
|
@@ -76,7 +80,7 @@ class CommunityAllCommentView: FWPopupView {
|
|
|
tableView.snp.makeConstraints { (make) in
|
|
|
make.top.equalTo(topView.snp_bottom)
|
|
|
make.left.right.equalToSuperview()
|
|
|
- make.bottom.equalTo(-48)
|
|
|
+ make.bottom.equalTo(-48-kSafeTabBarHeight)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -89,6 +93,11 @@ class CommunityAllCommentView: FWPopupView {
|
|
|
[weak self] (page) in
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ commentInputView.commentInputViewClosure = {
|
|
|
+ [weak self] text in
|
|
|
+// self?.communityPostCommentApi(text: text)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private lazy var topView: UIView = {
|
|
@@ -123,6 +132,11 @@ class CommunityAllCommentView: FWPopupView {
|
|
|
return noCommentsLabel
|
|
|
}()
|
|
|
|
|
|
+ lazy var commentInputView: CommentInputView = {
|
|
|
+ let commentInputView = CommentInputView(isHidden: false, height: kSafeTabBarHeight + 500)
|
|
|
+ return commentInputView
|
|
|
+ }()
|
|
|
+
|
|
|
lazy var tableView: UITableView = {
|
|
|
let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
|
|
|
tableView.separatorStyle = .none
|
|
@@ -186,7 +200,8 @@ extension CommunityAllCommentView : UITableViewDelegate, UITableViewDataSource {
|
|
|
}
|
|
|
|
|
|
extension CommunityAllCommentView {
|
|
|
- /// 评论
|
|
|
+
|
|
|
+ /// 评论列表
|
|
|
///
|
|
|
/// - Parameters:
|
|
|
/// - postId: 内容id
|