jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

How to change activity indicator color? #383

Closed yinanfang closed 8 years ago

yinanfang commented 8 years ago

I saw the discussion on the earlier thread #313. I wasn't intent to use a custom view instead of the activity indicator. I just want to simply change the color. #313 mentioned that hud.activityIndicatorColor is deprecated. What's the new property for it?

yas375 commented 8 years ago

Interesting. Per the deprecation warning I would assume you should use

[[UIActivityIndicatorView appearanceWhenContainedIn:[MBProgressHUD class], nil] setColor:[UIColor orangeColor]];

But this line overrides it and MBProgressHUD#contentColor will be used. But setting #contentColor will apply to text and to activity indicator at the same time...

matej commented 8 years ago

Yeah, that's not good. I think the best option here might be to expose indicator than you can cast it to the correct view type and customize it.

yinanfang commented 8 years ago

@yas375 Thanks for providing the solution. I think @matej has a valid point. It would be great if we can have an alternative that's similar to the deprecated hud.activityIndicatorColor

jjxtra commented 8 years ago

This is badly needed. Rolled back to an old version because it's basically impossible to change the activity indicator background color now.

matej commented 8 years ago

Should be fixed in f663584

jjxtra commented 8 years ago

Xcellent