我正在使用tableview来显示消息,我使用下面的代码
UIView *chatView = [self bubbleView:[NSString stringWithFormat:@"%@", message] from:YES];
[self.chatArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:message, @"text", @"self", @"speaker", chatView, @"view", nil]];
[self.chatTableView reloadData];
[self.chatTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:[self.chatArray count]-1 inSection:0]
atScrollPosition: UITableViewScrollPositionBottom
animated:YES];
Run Code Online (Sandbox Code Playgroud)
我收到下面给出的错误
[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (0) beyond bounds (0) for section (0).'
Run Code Online (Sandbox Code Playgroud)
PLZ帮助我解决这个问题