Skip to content

Commit

Permalink
Draw only background color to layer, fixes black at label edges with …
Browse files Browse the repository at this point in the history
…non-clear background color.
  • Loading branch information
cbpowell committed Mar 26, 2016
1 parent 942f27d commit 2ee9757
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MarqueeLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ - (CAReplicatorLayer *)repliLayer {
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx {
// Do NOT call super, to prevent UILabel superclass from drawing into context
// Label drawing is handled by sublabel and CAReplicatorLayer layer class

// Draw only background color
CGContextSetFillColorWithColor(ctx, self.backgroundColor.CGColor);
CGContextFillRect(ctx, layer.bounds);
}

- (void)forwardPropertiesToSubLabel {
Expand Down

0 comments on commit 2ee9757

Please sign in to comment.