Reputation: 643
I'm using Zynga's FontLabel to use a custom font in my iPhone project. Is there a way to add a text border and shadow using this?
Upvotes: 0
Views: 1070
Reputation: 29886
If you mean around the entire label, this FontLabel class appears to just be a subclass of UILabel which has the following properties:
@property(nonatomic,retain) UIColor *shadowColor;
@property(nonatomic) CGSize shadowOffset;
to control shadows. Furthermore, UILabel is a subclass of UIView, each of which is backed by a CALayer, which has the following properties that allow you to apply a border to any CALayer:
@property CGFloat borderWidth;
@property CGColorRef borderColor;
You should be able to set these properties on the object returned by your UILabel's layer property.
If you were looking for "outlined text" you need to look for a font that encapsulates that behavior. I don't think the kit can just "figure that one out" for you.
HTH.
Upvotes: 2