1
This commit is contained in:
@@ -30,6 +30,7 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
|
||||
@property (nonatomic, strong) NSIndexPath *playingCellIndexPath;
|
||||
@property (nonatomic, strong) AiVM *aiVM;
|
||||
@property (nonatomic, assign) BOOL hasMoreData;
|
||||
@property (nonatomic, assign) CGFloat contentBottomInset;
|
||||
|
||||
@end
|
||||
|
||||
@@ -78,11 +79,12 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
|
||||
|
||||
// 布局
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.equalTo(self);
|
||||
make.top.left.right.equalTo(self);
|
||||
make.bottom.equalTo(self).offset(-KB_TABBAR_HEIGHT - 40 - 10);
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
|
||||
self.contentBottomInset = KB_TABBAR_HEIGHT + 40 + 10;
|
||||
[self updateContentBottomInset:self.contentBottomInset];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
|
||||
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||
@@ -207,6 +209,14 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
|
||||
[self updateFooterVisibility];
|
||||
}
|
||||
|
||||
- (void)updateContentBottomInset:(CGFloat)bottomInset {
|
||||
self.contentBottomInset = bottomInset;
|
||||
UIEdgeInsets insets = self.tableView.contentInset;
|
||||
insets.bottom = bottomInset;
|
||||
self.tableView.contentInset = insets;
|
||||
self.tableView.scrollIndicatorInsets = insets;
|
||||
}
|
||||
|
||||
- (void)addMessage:(KBAiChatMessage *)message
|
||||
autoScroll:(BOOL)autoScroll {
|
||||
if (!message) {
|
||||
|
||||
Reference in New Issue
Block a user