BackgroundView - LowKostKustomz/ActionsList GitHub Wiki
There are some background states by default:
- Normal: all content below actions list but sender view is blurred
- Reduce Transparency: all content below actions list but sender view is dimmed
- Old device: if device is too old for producing blur effect then all content below actions list but sender view is dimmed like with Reduce Transparency mode on
ActionsList handles all these states in realtime, so if user turns on/off Reduce Transparency toggle (or your device becomes old .-. ), list will automatically set appropriate background view.
Customizations
Dimming Background View
You can change dimmed background view background color
ActionsListAppearance.BackgroundView.common.dimmingColor = UIColor.white
Custom Background View
Also you can create your custom background view by implementing ActionsListBackgroundView
protocol.
After custom background view is created you can set it like that
ActionsListBackgroundViewBuilder.instance.type = .custom(backgroundView: customBackgroundView)
If custom background view was set then ActionsListBackgroundViewBuilder
will ignore reduce transparency mode changes and won't remove your custom background view.
To reset all changes your can use reset
method
ActionsListBackgroundViewBuilder.instance.reset()
It will reset your custom background view to default and will start handling blur availability again.