【发布时间】:2011-07-07 17:47:06
【问题描述】:
我在将字体添加到我的 iphone 应用程序时遇到问题 我想知道怎么做,让我指定我没有使用 IB 并且我继承了 UILabel 并制作了那个新类的标签,
请帮帮我, 我已经下载了 ttf 并想在我的应用程序中使用, 我在我的应用中添加了“应用程序提供的字体”,然后添加了带有 ttf 扩展名的字体名称,但仍然不起作用,我该怎么办?
@implementation RRSGlowLabel
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if(self != nil) {
self.glowOffset = CGSizeMake(0.0, 0.0);
self.glowAmount = 0.0;
self.glowColor = [UIColor clearColor];
[self setFont: [UIFont fontWithName: @"DS-DIGI" size: self.font.pointSize]];
}
return self;
}
DS-DIGI.ttf 是我的字体,添加了以下资源, 而RRSGlowLabel是UILabel的继承类,现在该怎么办?
【问题讨论】: