Can not change UILabel text color

Posted by HelloWorld on Stack Overflow See other posts from Stack Overflow or by HelloWorld
Published on 2010-03-28T09:20:05Z Indexed on 2010/03/28 9:23 UTC
Read the original article Hit count: 433

Filed under:
|

Hi, all

I want to chang UILabel text color,but can't change it's color,This is my code.

UILabel *categoryTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 46, 16)];
categoryTitle.text = @"abc";
categoryTitle.backgroundColor = [UIColor clearColor];
categoryTitle.font = [UIFont systemFontOfSize:12];
categoryTitle.textAlignment = UITextAlignmentCenter;
categoryTitle.adjustsFontSizeToFitWidth = YES;
categoryTitle.textColor = [UIColor colorWithRed:188 green:149 blue:88 alpha:1.0];
[self.view addSubview:categoryTitle];
[categoryTitle release];

The label text color is white ,not my custome color.

Thank for any help.

© Stack Overflow or respective owner

Related posts about uilabel

Related posts about uicolor