开发者

iPhone UITableView Controller shows last item on the startup

开发者 https://www.devze.com 2023-04-03 02:50 出处:网络
UITableView shows last item on the startup. How do I view the first item on th开发者_JAVA技巧e startup?You can call following method to position your table view to any cell that you want:

UITableView shows last item on the startup. How do I view the first item on th开发者_JAVA技巧e startup?


You can call following method to position your table view to any cell that you want:

- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;

For example,

[tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
0

精彩评论

暂无评论...
验证码 换一张
取 消