Commit 5c94cc52 by Daniel Dahan

editor: updated pulse to MotionPulse and fixed leaks

parent 2b1604d4
...@@ -86,11 +86,12 @@ internal struct MotionPulse<T: UIView> where T: Pulseable { ...@@ -86,11 +86,12 @@ internal struct MotionPulse<T: UIView> where T: Pulseable {
let pLayer = CAShapeLayer() let pLayer = CAShapeLayer()
bLayer.addSublayer(pLayer) bLayer.addSublayer(pLayer)
view.pulseLayers.insert(bLayer, at: 0)
view.pulseLayer.addSublayer(bLayer) view.pulseLayer.addSublayer(bLayer)
bLayer.zPosition = 0 bLayer.zPosition = 0
pLayer.zPosition = 0 pLayer.zPosition = 0
view.pulseLayers.insert(bLayer, at: 0)
view.pulseLayer.masksToBounds = !(.centerRadialBeyondBounds == view.pulseAnimation || .radialBeyondBounds == view.pulseAnimation) view.pulseLayer.masksToBounds = !(.centerRadialBeyondBounds == view.pulseAnimation || .radialBeyondBounds == view.pulseAnimation)
let w = view.width let w = view.width
...@@ -151,7 +152,6 @@ internal struct MotionPulse<T: UIView> where T: Pulseable { ...@@ -151,7 +152,6 @@ internal struct MotionPulse<T: UIView> where T: Pulseable {
return return
} }
guard let animated = bLayer.value(forKey: "animated") as? Bool else { guard let animated = bLayer.value(forKey: "animated") as? Bool else {
return return
} }
......
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