【问题标题】:UIRefreshControl change color of UIActivityIndicatorViewUIRefreshControl 改变 UIActivityIndi​​catorView 的颜色
【发布时间】:2013-01-16 12:57:56
【问题描述】:

有什么办法可以改变UIRefreshControl的“UIActivityIndi​​catorView”的颜色??

我什么都没找到!

谢谢!!

【问题讨论】:

标签: objective-c xcode colors uiactivityindicatorview uirefreshcontrol


【解决方案1】:

您可以通过设置UIRefreshControlTint Color 来做到这一点,如下所示:

目标 C [refreshControl setTintColor:[UIColor blackColor]];

斯威夫特 refreshControl.tintColor = .black

这也会改变滑动时展开的箭头。

【讨论】:

    【解决方案2】:

    由于之前的答案已经过时,我想我只需将其修改为 Swift 4 并分享解决方案(感谢 @subharb)。

    refreshControl.tintColor = UIColor.white
    

    这行代码会将 UIActivityIndi​​catorView 的颜色更改为您想要的任何颜色:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-09
      相关资源
      最近更新 更多