TABAnimated
TABAnimated copied to clipboard
TableView动态估算高度UITableViewAutomaticDimension导致动画结束之后cell高度不对数据展示不全
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewAutomaticDimension; }
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath { return 66; }
cell高度根据QMUITextView内容撑开 QMUITextView实现代理 // 实现这个 delegate 方法就可以实现自增高
- (void)textView:(QMUITextView *)textView newHeightAfterTextChanged:(CGFloat)height { BOOL needsChangeHeight = CGRectGetHeight(textView.frame) != height; if (needsChangeHeight) { UITableView *tableView = [self tableView]; [tableView beginUpdates]; [tableView endUpdates]; } }
cell布局 都是给的上下左右边距约束
不加载骨架屏是正常显示
加载骨架屏动画结束后cell高度撑不开
结束动画后,用update系列方法强行刷新试试。
[self.tableView tab_endAnimationEaseOut]; [self.tableView beginUpdates]; [self.tableView endUpdates];
还是不行