66

I would like to have my UIActivityIndicatorView be colored a custom color. Is there any way to set this property?

3 Answers 3

160

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

Sign up to request clarification or add additional context in comments.

Comments

4

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).

2 Comments

Hi kenny...its good idea but have you any sample code to rotational animation of UIImageView ?
@yakub: No. You create 10 images and use animationImages. At least that how the indicator views work.
2

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.