Commit 695e9e13 by adamdahan

fixes small optimization for shadow drawing on cards

parent 370d6560
...@@ -78,10 +78,14 @@ public class MaterialPulseView : MaterialView { ...@@ -78,10 +78,14 @@ public class MaterialPulseView : MaterialView {
layer.shadowOffset = CGSizeMake(0.5, 0.5) layer.shadowOffset = CGSizeMake(0.5, 0.5)
layer.shadowRadius = 5.0 layer.shadowRadius = 5.0
layer.shadowOpacity = 0.4 layer.shadowOpacity = 0.4
layer.shadowPath = UIBezierPath(rect: bounds).CGPath
layer.cornerRadius = 2.0 layer.cornerRadius = 2.0
} }
public override func layoutSubviews() {
super.layoutSubviews()
layer.shadowPath = UIBezierPath(rect: bounds).CGPath
}
// We need this view so we can use the masksToBounds // We need this view so we can use the masksToBounds
// so the pulse doesn't animate off the button // so the pulse doesn't animate off the button
private func setupBackgroundColorView() { private func setupBackgroundColorView() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment