UILabel

Creating a label

CGRect labelFrame = CGRectMake(0.0, 0.0, 100.0, 30.0);
UILabel *label = [[UILabel alloc] initWithFrame:labelFrame];
[label setFont:[UIFont systemFontOfSize:12]];
label.textAlignment = UITextAlignmentLeft;
[label setText:@"TextLabel:"];
label.textColor = [UIColor whiteColor];
label.backgroundColor = [UIColor blackColor];
[self.view addSubview:label];

Comments