aboutsummaryrefslogtreecommitdiff
path: root/iPhone
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-09-01 13:30:21 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-09-01 13:30:21 +0000
commitf46577f049d4760a8b81e469e04fe4e50ff78092 (patch)
tree6f91246317148293161837bb963661ffa04b6897 /iPhone
parentd75eaf5688872bd6fe245e11c048c40817b7ee1b (diff)
[Author: stuartmorgan]
Add text shadow support to GTMFadeTruncatingLabel R=thomasvl APPROVED=thomasvl
Diffstat (limited to 'iPhone')
-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