UILabel *label_word = [[UILabel alloc] initWithFrame:CGRectMake(30.0f, 30.0f, 150.0f, 80.0f)];
NSString *title = [NSString stringWithFormat:@"UILabel Sample"];
[label_word setText:title];
[label_word setNumberOfLines:2];
[label_word setLineBreakMode:label_word.lineBreakMode];
[label_word setFont:[UIFont fontWithName:@"Arial-BoldMT" size:32]];
[label_word setTextColor:[UIColor blackColor]];
[label_word setBackgroundColor:[UIColor clearColor]];
[self.view addSubview:label_word];
全站熱搜