<p>I would like to completely reset the scroll position of a UITableView, so that every time I open it, it is displaying the top-most items. In other words, I would like to scroll the table view to the top every time it is opened.</p>

<p>I tried using the following piece of code, but it looks like I misunderstood the documentation:</p>

<pre><code>- (void)viewWillAppear:(BOOL)animated {
    [tableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionTop animated:NO];
}
</code></pre>

<p>Is this the wrong approach here?</p>

The method you're using scrolls to (as the method name implies) the nearest selected row. In many cases, this won't be the top row. Instead, you want to use either
```
```
scrollToRowAtIndexPath:atScrollPosition:animated:
```
```
or
```
```
selectRowAtIndexPath:animated:scrollPosition:
```
```
where you use the index path of the row you want to scroll to. The second method actually selects a row, the first method simply scrolls to it.