mrackwitz / MRProgress

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

Background Tint #59

Open jeffreyjackson opened 9 years ago

jeffreyjackson commented 9 years ago

Any way to change the background tint instead of the default frosty white?

mrackwitz commented 9 years ago

You can subclass MRProgressOverlayView and overwrite createBlurView to archieve a custom background. It would be possible to expose the settings, which are applied in MRBlurView, which is used in the default implementation. This would make it easier to have custom blur effects. Are you interested in such a change?

jeffreyjackson commented 9 years ago

Yes, essentially I would like to a backgroundTint option which would still have the frosty blue effect but with any color. What are your thoughts?

mrackwitz commented 9 years ago

On the one hand, I'd add a property blurTintColor to MRBlurView, which will be initialized by default with the white color, but could be customized and will be passed as 2nd argument to mr_applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:.
But on the other hand, I'd prefer to keep things forwards-compatible with the upcoming chages in #51. So perhaps the better solution is just to insert a translucent colored layer / view in front of the blurred background.

jeffreyjackson commented 9 years ago

Your call on this. I think your suggestion with #51 would work fine. Thanks for this!!

jeffreyjackson commented 9 years ago

hey @mrackwitz, i've thought more about this. Would it be easier to give us the ability to toggle the uiblureffect styles instead? I think it would be nice to have a hud that uses the Dark style of uiblureffect. I tried setting this myself in MROverlayProgressView, but it looks like it still uses ExtraLight. Any ideas?

jeffreyjackson commented 9 years ago

just re-reading what we've discussed. If i wanted to try the Dark style myself, i could just override createBlurView? Do you have a quick example of how you would suggest overriding this to ensure the view hierarchy is maintained as designed?