How to make inverted shadow on UILabel?
I'm trying to get an "embed" effect on my UILabel in my app.
Here's what I mean:
I want it to look like the font is "embedded" or pressed into the background. Please note this font is dynamic, the UILabel will be changed programmatically.
Any ideas as to how this can be done, or as to what font looks like this?
Thanks in advance!
--------------------------------------------------------------------------------------------------------------
Edit: Thanks to fbrunel, I figured out how to do it. Check out the result, though.
It really开发者_如何学编程 doesn't look very nice, any ideas why?
It's done using an "inverted" shadow on the text. On UILabel you have two properties to do this: shadowColor and shadowOffset (the direction of the shadow).
label.shadowColor = [UIColor whiteColor];
label.shadowOffset = CGSizeMake(0, 1);
Will do the trick.
精彩评论