Aditya Teja
Aditya Teja

Reputation: 63

iOS - Override UIActivityIndicatorView's default color for the entire application

I am developing an hybrid application in javascript for iOS. And I don't have access to the underlying framework, which shows the UIActivityIndicatorView. I want to change the colour of the indicator either programmatically or setting some properties.

PS: I could do this in Android by setting themes. Hoping for a similar way, as I am new to iOS development.

Upvotes: 1

Views: 331

Answers (1)

clemens
clemens

Reputation: 17721

You may set the colors globally via UIAppearance, e. g.:

[[UIActivityIndicatorView appearance] setColor:[UIColor red]];

or the same in Swift 4:

UIActivityIndicatorView.appearance().color = .red

Upvotes: 1

Related Questions