Is it possible to change an UIActivityIndicatorView color to black in iOS?
You can use the .color
property in order to change the UIActivityIndicatorView
color, e.g.:
// Objective-CactivityIndicator.color = [UIColor greenColor];// SwiftactivityIndicator.color = .green
Note that .color
is only available from iOS 5.
To use a standard system color:
activityIndicator.color = .green
To use a custom RGBA color
activityIndicator.color = UIColor(displayP3Red: 255/255, green: 150/255, blue: 181/255, alpha: 255/255)
You can switch between .gray
, .white
and .whiteLarge
by using the .activityIndicatorViewStyle
property.