开发者

drop shadow effect for text in iOS4

开发者 https://www.devze.com 2023-04-06 06:56 出处:网络
I\'ve been trying to get the following effects on my text: I want to get the white border around my text, I tried playing around with the following, but it didn\'t work out

I've been trying to get the following effects on my text:

drop shadow effect for text in iOS4

I want to get the white border around my text, I tried playing around with the following, but it didn't work out

self.name.layer.shadowOpacity = 5.0;   
    self.name.layer.shadowRadius = 0.0;
    self.name.layer.shadowColor = [UIColor whiteColor].CGColor;
    self.name.layer.shadowOffset = CGSizeMake(0.0, -5.0);

What 开发者_运维知识库is the easiest way to achieve this?


try the following

self.name.layer.shadowColor = [label.textColor CGColor];
self.name.layer.shadowOffset = CGSizeMake(0.0, 0.0);
self.name.layer.shadowOpacity = 0.5;
self.name.layer.shadowRadius = 20.0;
0

精彩评论

暂无评论...
验证码 换一张
取 消