Skip to content

Commit c78bdde

Browse files
committed
Overrides backgroundColor prop on MultipleShadowView so it updates
the shadow layer's background colour too
1 parent 4a1fdf6 commit c78bdde

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ThunderBasics/MultipleShadowView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ public class MultipleShadowView: UIView {
4343
return CornerObservableLayer.self
4444
}
4545

46+
public override var backgroundColor: UIColor? {
47+
didSet {
48+
forEachShadowLayer { (shadowLayer) in
49+
shadowLayer.backgroundColor = layer.backgroundColor
50+
}
51+
}
52+
}
53+
4654
/// Whether the shadow layers should update their corner radius to match the view's
4755
/// layer's corner radius
4856
public var matchShadowCornerRadius: Bool = true {

0 commit comments

Comments
 (0)