Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableView Set Selected Row to Refresh Control
    primarykey
    data
    text
    <p>I would like to set the <code>selected row</code> in a <code>UITableView</code> to the <code>refresh control</code>. I am doing this, because I have a <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIRefreshControl_class/Reference/Reference.html" rel="nofollow">refresh control</a> at the top of my <code>UITableView</code>, and when I am loading data (and they have not actually caused it by pulling it down), I would like the <code>activity indicator view</code> to be visible (that is part of the <code>refresh control</code>).</p> <p>Right now, what I do is set the <code>refresh control</code> to the "refreshing state" (has the spinning activity indicator).</p> <pre><code>[self.refreshControl beginRefreshing]; </code></pre> <p>This works great, but the only problem is, is that they cannot see it unless the pull up because it's default value at row 1 (index 0), so it is hidden.</p> <p><strong>Note:</strong> There are 0 items (and always will be) in the <code>UITableView</code> while this is happening.</p> <p>For example, if I go:</p> <pre><code>[self.tableView selectRowAtIndexPath:0 animated:YES scrollPosition:UITableViewScrollPositionTop]; </code></pre> <p>It will set the position of the selected item to the first row, but I want to make it show the refresh control, so I guess possibly doing:</p> <pre><code>[self.tableView selectRowAtIndexPath:-1 animated:YES scrollPosition:UITableViewScrollPositionTop]; </code></pre> <p>would work (as it's 1 index below the first item), but of course that won't compiler.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload