适合显示时间的字体

在。。。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];

}


运行后会看到:





你可能感兴趣的:(适合显示时间的字体)