mrackwitz / MRProgress

Collection of iOS drop-in components to visualize progress
MIT License
2.55k stars 305 forks source link

Automatic dark mode #86

Open Jeehut opened 9 years ago

Jeehut commented 9 years ago

I am using MRProgress in several apps. In all apps it seems to be a good idea to choose the same background color like the navigation bar (if one apparent) as the default background color of the progress view. So I changed all default coloring implementation to automatically change to a dark coloring (by simply inverting the colors) when the status bar style is set to LightContent.

Maybe you want to consider to integrate this into MRProgress or think about a similar solution. I've read https://github.com/mrackwitz/MRProgress/issues/59 and couldn't find another working solution for a background tint yet. So I came up with this automatic one. Hope you like it.

marcelofabri commented 9 years ago

Just curious here: does [UIApplication sharedApplication].statusBarStyle work if you use View Controller based status bar style?

Jeehut commented 9 years ago

Haven't tested different styles within one app, but as far as I know a new MRProgressOverlayView is created with each presentation, this would mean it should work. But haven't had a deeper look. Wanna try it out?