我需要的标签为 添加遮阳标记
我创建了一个标签subclass.Where我写的代码,
- (void)drawRect:(CGRect)rect
{
[super drawRect:rect];
UIColor * textColor = [UIColor colorWithRed:57.0/255.0 green:100.0/255.0 blue:154.0/255.0 alpha:1.0];
CGContextRef c = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(c, 3.5);
CGContextSetLineJoin(c, kCGLineJoinRound);
CGContextSetTextDrawingMode(c, kCGTextFillStroke);;
self.textColor = [UIColor whiteColor];
[super drawTextInRect:rect];
CGContextSetTextDrawingMode(c, kCGTextFill);
self.textColor = textColor;
// self.shadowColor = [UIColor colorWithRed:11.0/255.0 green:63.0/255.0 blue:126.0/255.0 alpha:1.0];
//self.shadowOffset = CGSizeMake(0.5, -0.5);
[super drawTextInRect:rect];
}
通过这个我收到的蓝色文字和白色轮廓但是我需要得到深蓝色的颜色。我怎样才能做到这一点? 请帮帮我。
Samowski我试过这个,但它没有奏效。 – hgpl 2012-02-22 13:56:03
你是什么意思'没有工作'?效果不是你想要的,或者你不能让它工作? – 2012-02-23 02:54:45
Samowski效果没有出现,因为我想。它影响白色,但我想要淡蓝色的效果。 – hgpl 2012-02-23 05:51:38