Skip to content

Commit

Permalink
Remove gradient mask in the case of labelization [common]
Browse files Browse the repository at this point in the history
  • Loading branch information
cbpowell committed Jul 9, 2016
1 parent 940acfc commit f201564
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Sources/ObjC/MarqueeLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ - (void)updateSublabelAndBeginScroll:(BOOL)beginScroll {
// Set sublabel frame calculated labelFrame
self.subLabel.frame = labelFrame;

// Remove fade, as by definition none is needed in this case
[self removeGradientMask];

return;
}

Expand Down
6 changes: 3 additions & 3 deletions Sources/Swift/MarqueeLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,8 @@ public class MarqueeLabel: UILabel {
// Set the sublabel frame to calculated labelFrame
sublabel.frame = labelFrame

// Configure fade
applyGradientMask(fadeLength, animated: !labelize)
// Remove fade, as by definition none is needed in this case
removeGradientMask()

return
}
Expand Down Expand Up @@ -633,7 +633,7 @@ public class MarqueeLabel: UILabel {
}()

// Configure gradient for current condition
applyGradientMask(fadeLength, animated: !self.labelize)
applyGradientMask(fadeLength, animated: !labelize)

if !tapToScroll && !holdScrolling && shouldBeginScroll {
beginScroll()
Expand Down

0 comments on commit f201564

Please sign in to comment.