Custom color my UIActivityIndicatorView

IosObjective CUiactivityindicatorview

Ios Problem Overview


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

Ios Solutions


Solution 1 - Ios

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

Solution 2 - Ios

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

Solution 3 - Ios

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlavoyView Question on Stackoverflow
Solution 1 - IosRoland KeesomView Answer on Stackoverflow
Solution 2 - IoskennytmView Answer on Stackoverflow
Solution 3 - IosMurray SagalView Answer on Stackoverflow