UIButton titleLabel not displaying

You always need to specify ControlState when updating button’s title!
There are four possible values for UIButtons:

UIControlStateNormal
UIControlStateHighlighted
UIControlStateDisabled
UIControlStateSelected

so for example:

[button setTitle:@"Title" forState:UIControlStateNormal];

and then you can set custom settings for titleLabel:

[button.titleLabel setFont:[UIFont fontWithName:@"Zapfino" size:20.0]];
[button.titleLabel setTextColor:[UIColor blueColor]];

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)