开发者

Custom color my UIActivityIndicatorView

开发者 https://www.devze.com 2022-12-30 00:27 出处:网络
I would like to have my UIActivityIndicatorView be col开发者_如何学Pythonored a custom color.Is there any way to set this property?In iOS 5.0 and up you can use setColor: on the UIActivityIndicatorVie

I would like to have my UIActivityIndicatorView be col开发者_如何学Pythonored a custom color. Is there any way to set this property?


In iOS 5.0 and up you can use setColor: on the UIActivityIndicatorView to set a custom color.

In Swift you can just use activityIndicatorView.color = UIColor.red


You need to create a custom set of images (better), then animate it using a UIImageView.

Or place a colored transparent view on top of the activity indicator to "tint" it (lower quality).


For Xcode 7 (possibly earlier) you can also specify the color directly in Interface Builder.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号