Pugal Pugal - 5 months ago 49
iOS Question

Is it possible to change an UIActivityIndicatorView color to black in iOS?

I want to change an activity indicator color gray/white to black. Is it possible to change the color to black? If yes, please guide me or give some sample code.

Answer Source

You can use the .color property in order to change the UIActivityIndicatorView color, e.g.:

// Objective-C
activityIndicator.color = [UIColor greenColor];

// Swift
activityIndicator.color = .green

Note that .color is only available from iOS 5.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download