Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS 7 UIRefreshControl tintColor not working for beginRefreshing
    text
    copied!<p>I'm trying to set a tintColor on my UIRefreshControl (building on iOS 7). I enabled refreshing for the tableViewController in storyboard, then in my ViewController <code>viewDidLoad</code> method i did the following:</p> <pre><code>[self.refreshControl setTintColor:[UIColor redColor]]; </code></pre> <p>So now, when I pull to refresh, the color of the refresh control is red indeed:</p> <p><img src="https://i.stack.imgur.com/CfRhA.png" alt="redSpiny"></p> <p>I want my view to update automatically when it appears, so I did:</p> <pre><code>- (void)viewDidAppear:(BOOL)animated{ [self.refreshControl beginRefreshing]; } </code></pre> <p>It didn't show the spinning wheel, according to <a href="https://stackoverflow.com/a/16250679/1809736">https://stackoverflow.com/a/16250679/1809736</a>, I added</p> <pre><code>[self.tableView setContentOffset:CGPointMake(0, -self.refreshControl.frame.size.height) animated:NO]; </code></pre> <p>to force show it. It shows it, but now it is back to default color: </p> <p><img src="https://i.stack.imgur.com/btDMh.png" alt="enter image description here"></p> <p>If I try manually to pull to refresh afterwards, it is red.</p> <p>I tried building it on iOS6 and it works as it should, so is that an iOS7 bug?</p> <p>P.S.: it is not a problem with the simulator, I tried building it on device, same bug.</p> <p>P.P.S: I built an example project, can you tell me if you have the same bug or if there is a problem in my code? Here is the link: <a href="http://d.pr/f/pGrV" rel="noreferrer">http://d.pr/f/pGrV</a></p> <p>Thanks a lot !</p>
 

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