Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

ShadowConfig

IGR777 edited this page Aug 30, 2018 · 1 revision

Entity which defines shadow parameters. Includes color, offset, blur, spread.

Fields

UIColor Color Color - shadow's color.

CGPoint Point Offset - x and y offset for shadow.

nfloat int Blur - shadow's blur radius.

int Spread - shadow's spread. Doesn't use at the moment.

Usage

iOS

When Shadow config is set for the control, it's alter UIView shadow layer. Under the hood it works like this:

Layer.ShadowColor = config.Color.CGColor;
Layer.ShadowOffset = new CGSize(config.Offset);
Layer.ShadowRadius = config.Blur / 2;
Layer.ShadowOpacity = 1.0f;

Android

For simple button, shadow config alters only elevation property. For FabProgress there is custom shadow drawable which paints shadow layer.

Clone this wiki locally