如何在刷新时更改UIRefreshControl的颜色?

问题描述:

我想在“刷新”状态下更改UIRefreshControl的颜色。它可以在iOS 6上正常工作,但在iOS 7上不起作用。如何在刷新时更改UIRefreshControl的颜色?

+1

可能重复http://stackoverflow.com/questions/19026351/ios-7-uirefreshcontrol-tintcolor-not-working-for-beginrefreshing – CSmith

这不是我的代码,我发现它在一个月前的某个地方,它适用于我。

CGRect refreshFrame = self.tableView.bounds; 
refreshFrame.origin.y = -frame.size.height; 
UIView* refreshBackgroundView = [[UIView alloc] initWithFrame:refreshFrame]; 
refreshBackgroundView.backgroundColor = [UIColor redColor]; //<- Here you choose what colour you want 

[self.tableView insertSubview:refreshBackgroundView atIndex:0]; 
+0

谢谢你,但我想改变微调不是背景色的颜色 – ChikabuZ