aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xiPhone/GTMFadeTruncatingLabel.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/iPhone/GTMFadeTruncatingLabel.m b/iPhone/GTMFadeTruncatingLabel.m
index 619e7bb..2a24a2c 100755
--- a/iPhone/GTMFadeTruncatingLabel.m
+++ b/iPhone/GTMFadeTruncatingLabel.m
@@ -54,6 +54,16 @@
CGContextClipToMask(context, self.bounds, image.CGImage);
}
+ if (self.shadowColor) {
+ CGContextSetFillColorWithColor(context, self.shadowColor.CGColor);
+ CGRect shadowRect = CGRectOffset(requestedRect, self.shadowOffset.width,
+ self.shadowOffset.height);
+ [self.text drawInRect:shadowRect
+ withFont:self.font
+ lineBreakMode:UILineBreakModeClip
+ alignment:self.textAlignment];
+ }
+
CGContextSetFillColorWithColor(context, self.textColor.CGColor);
[self.text drawInRect:requestedRect
withFont:self.font