Skip to content

Commit

Permalink
Clean up gradient setup animation logic [swift]
Browse files Browse the repository at this point in the history
  • Loading branch information
cbpowell committed Jul 9, 2016
1 parent f201564 commit 3ee1e76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Swift/MarqueeLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1161,8 +1161,8 @@ public class MarqueeLabel: UILabel {
}

override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
if anim is GradientSetupAnimation {
if let setupAnim = maskLayer?.animationForKey("setupFade") as? CABasicAnimation, finalColors = setupAnim.toValue as? [CGColorRef] {
if let setupAnim = anim as? GradientSetupAnimation {
if let finalColors = setupAnim.toValue as? [CGColorRef] {
maskLayer?.colors = finalColors
}
// Remove regardless, since we set removeOnCompletion = false
Expand Down

0 comments on commit 3ee1e76

Please sign in to comment.