[UITableView _contentOffsetForScrollingToRowAtIndexPath: atScrollPosition:]

Je suis l'aide d'une tableview pour afficher un message et j'ai utilisé le code ci-dessous

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];

Et j'obtiens l'erreur donnée ci-dessous

[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (0) beyond bounds (0) for section (0).'

plz m'aider dans la résolution de ce

source d'informationauteur vinoad vinu