1
This commit is contained in:
@@ -91,7 +91,7 @@ static NSInteger const kRepliesLoadCount = 3;
|
|||||||
[self.inputView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.inputView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.right.equalTo(self);
|
make.left.right.equalTo(self);
|
||||||
make.height.mas_equalTo(50);
|
make.height.mas_equalTo(50);
|
||||||
self.inputBottomConstraint = make.bottom.equalTo(self);
|
self.inputBottomConstraint = make.bottom.equalTo(self).offset(-KB_SafeAreaBottom());
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -354,17 +354,15 @@ static NSInteger const kRepliesLoadCount = 3;
|
|||||||
inSection:section]];
|
inSection:section]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新(避免动画导致跳动)
|
// 更新(带轻微动画)
|
||||||
[UIView performWithoutAnimation:^{
|
[self.tableView beginUpdates];
|
||||||
[self.tableView beginUpdates];
|
if (insertIndexPaths.count > 0) {
|
||||||
if (insertIndexPaths.count > 0) {
|
[self.tableView insertRowsAtIndexPaths:insertIndexPaths
|
||||||
[self.tableView insertRowsAtIndexPaths:insertIndexPaths
|
withRowAnimation:UITableViewRowAnimationFade];
|
||||||
withRowAnimation:UITableViewRowAnimationNone];
|
}
|
||||||
}
|
[self.tableView endUpdates];
|
||||||
[self.tableView endUpdates];
|
[self.tableView layoutIfNeeded];
|
||||||
[self.tableView layoutIfNeeded];
|
[self restoreHeaderAnchor:anchor];
|
||||||
[self restoreHeaderAnchor:anchor];
|
|
||||||
}];
|
|
||||||
|
|
||||||
NSLog(@"[KBAICommentView] loadMore(after) section=%ld offsetY=%.2f contentSizeH=%.2f boundsH=%.2f rows=%ld",
|
NSLog(@"[KBAICommentView] loadMore(after) section=%ld offsetY=%.2f contentSizeH=%.2f boundsH=%.2f rows=%ld",
|
||||||
(long)section,
|
(long)section,
|
||||||
@@ -411,17 +409,15 @@ static NSInteger const kRepliesLoadCount = 3;
|
|||||||
// 收起回复
|
// 收起回复
|
||||||
[comment collapseReplies];
|
[comment collapseReplies];
|
||||||
|
|
||||||
// 删除行(避免动画导致跳动)
|
// 删除行(带轻微动画)
|
||||||
[UIView performWithoutAnimation:^{
|
[self.tableView beginUpdates];
|
||||||
[self.tableView beginUpdates];
|
if (deleteIndexPaths.count > 0) {
|
||||||
if (deleteIndexPaths.count > 0) {
|
[self.tableView deleteRowsAtIndexPaths:deleteIndexPaths
|
||||||
[self.tableView deleteRowsAtIndexPaths:deleteIndexPaths
|
withRowAnimation:UITableViewRowAnimationFade];
|
||||||
withRowAnimation:UITableViewRowAnimationNone];
|
}
|
||||||
}
|
[self.tableView endUpdates];
|
||||||
[self.tableView endUpdates];
|
[self.tableView layoutIfNeeded];
|
||||||
[self.tableView layoutIfNeeded];
|
[self restoreHeaderAnchor:anchor];
|
||||||
[self restoreHeaderAnchor:anchor];
|
|
||||||
}];
|
|
||||||
|
|
||||||
NSLog(@"[KBAICommentView] collapse(after) section=%ld offsetY=%.2f contentSizeH=%.2f boundsH=%.2f rows=%ld",
|
NSLog(@"[KBAICommentView] collapse(after) section=%ld offsetY=%.2f contentSizeH=%.2f boundsH=%.2f rows=%ld",
|
||||||
(long)section,
|
(long)section,
|
||||||
|
|||||||
@@ -240,24 +240,25 @@
|
|||||||
|
|
||||||
#pragma mark - 事件
|
#pragma mark - 事件
|
||||||
- (void)showComment {
|
- (void)showComment {
|
||||||
CGFloat customViewHeight = KB_SCREEN_HEIGHT * (0.8);
|
CGFloat customViewHeight = KB_SCREEN_HEIGHT * (0.8);
|
||||||
KBAICommentView *customView = [[KBAICommentView alloc]
|
KBAICommentView *customView = [[KBAICommentView alloc]
|
||||||
initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)];
|
initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)];
|
||||||
LSTPopView *popView =
|
LSTPopView *popView =
|
||||||
[LSTPopView initWithCustomView:customView
|
[LSTPopView initWithCustomView:customView
|
||||||
parentView:self.view
|
parentView:nil
|
||||||
popStyle:LSTPopStyleSmoothFromBottom
|
popStyle:LSTPopStyleSmoothFromBottom
|
||||||
dismissStyle:LSTDismissStyleSmoothToBottom];
|
dismissStyle:LSTDismissStyleSmoothToBottom];
|
||||||
self.popView = popView;
|
self.popView = popView;
|
||||||
popView.priority = 1000;
|
popView.priority = 1000;
|
||||||
popView.hemStyle = LSTHemStyleBottom;
|
popView.isAvoidKeyboard = false;
|
||||||
popView.dragStyle = LSTDragStyleY_Positive;
|
popView.hemStyle = LSTHemStyleBottom;
|
||||||
popView.dragDistance = customViewHeight * 0.5;
|
popView.dragStyle = LSTDragStyleY_Positive;
|
||||||
popView.sweepStyle = LSTSweepStyleY_Positive;
|
popView.dragDistance = customViewHeight * 0.5;
|
||||||
popView.swipeVelocity = 1600;
|
popView.sweepStyle = LSTSweepStyleY_Positive;
|
||||||
popView.sweepDismissStyle = LSTSweepDismissStyleSmooth;
|
popView.swipeVelocity = 1600;
|
||||||
|
popView.sweepDismissStyle = LSTSweepDismissStyleSmooth;
|
||||||
[popView pop];
|
|
||||||
|
[popView pop];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)showCommentDirectly {
|
- (void)showCommentDirectly {
|
||||||
|
|||||||
Reference in New Issue
Block a user