SnowFalling icon indicating copy to clipboard operation
SnowFalling copied to clipboard

Removing old flakes

Open johnrickman opened this issue 10 years ago • 0 comments

There is simple issue where when you restart the animation the previous flakes are stuck at the bottom. I fixed this by removing the flakes from the superview in stopSnow()..

func stopSnow() { for v: UIImageView in flakesArray! { v.layer.removeAllAnimations() v.removeFromSuperview() <-------------------------- } flakesArray = nil }

johnrickman avatar Oct 08 '15 15:10 johnrickman