现在的位置: 首页 > 综合 > 正文

适合显示时间的字体

2013年08月13日 ⁄ 综合 ⁄ 共 494字 ⁄ 字号 评论关闭

在。。。ViewController的viewDidLoad函数中添加下面的代码:

- (void)viewDidLoad

{

    [super viewDidLoad];

// Do any additional setup after loading the view, typically from a nib.

    

    self.view.backgroundColor = [UIColor blackColor];

    

    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 50, 320, 300)];

    label.font = [UIFont fontWithName:@"DBLCDTempBlack" size:128.0];

    label.backgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0];

    label.text = @"10:32";

    label.textColor = [UIColor greenColor];

    [self.view addSubview:label];

}

运行后会看到:

抱歉!评论已关闭.