UITableView does not scroll to cell

Posted by Sheehan Alam on Stack Overflow See other posts from Stack Overflow or by Sheehan Alam
Published on 2010-05-26T06:22:09Z Indexed on 2010/06/14 10:52 UTC
Read the original article Hit count: 183

I am trying to scroll my tableview to the 2nd cell:

[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0] 
                                  atScrollPosition:UITableViewScrollPositionNone 
                                           animated:NO];

I get the error:

 *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]: section (1) beyond bounds (0).

'

My tableview has 30 cells that are appearing with no sections.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c