I would like to have my UIActivityIndicatorView
be colored a custom color. Is there any way to set this property?
Asked
Active
Viewed 2.8k times
61

Quentin Hayot
- 7,786
- 6
- 45
- 62

lavoy
- 1,876
- 3
- 21
- 36
3 Answers
153
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

Roland Keesom
- 8,180
- 5
- 45
- 52
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).

kennytm
- 510,854
- 105
- 1,084
- 1,005
-
Hi kenny...its good idea but have you any sample code to rotational animation of UIImageView ? – MohammedYakub M. May 11 '10 at 06:07
-
1@yakub: No. You create 10 images and use `animationImages`. At least that how the indicator views work. – kennytm May 11 '10 at 11:56
2
For Xcode 7 (possibly earlier) you can also specify the color directly in Interface Builder.

Murray Sagal
- 8,454
- 4
- 47
- 48