Reputation: 222
The code I have is pretty much this (no custom views, just a single view application):
viewController.h:
@interface ViewController : UIViewController <UITextFieldDelegate>
...
...
@property (strong, nonatomic) IBOutlet UILabel *statusMessage;
@end
ViewController.m:
@synthesize statusMessage = _statusMessage;
- (void) viewDidLoad {
...
...
...
self.statusMessage = [[UIlabel alloc] initWithFrame:CGRectMake(...)];
[self.statusMessage setTextColor:[UIColor redColor]];
}
I am able to change the background color and I have created other labels that display properly with which ever colors I choose for them, but no matter what I do this label always displays as a grayish color. Any suggestions are appreciated!
Upvotes: 3
Views: 3539
Reputation: 57188
Is your label disabled? Check the value of enabled
; if it's NO
, that could override your color. Ditto for highlighted
; if it's YES
, it will use the highlighted color.
Upvotes: 14