Ändern der Text in der Schaltfläche Farbe Schaltfläche in der Fußzeile in Tabelle Anzeigen

Ich habe eine UIView, die ich gemacht habe in einen button, der unter meinem Tisch Anzeigen:

myUIView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 120,50)];
UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom];
[myButton setAutoResizingMask:  [UIViewAutoResizingFlexibleWidth|UIViewAutoResizingFlexibleHeight];
[myButton setFrame:CGRectMake(20,0,80,40)];

myButton.titleLabel.textColor = [UIColor blackColor]; //Doesn't seem to work

[myButton setTitle:@"Test" forState:UIControlStateNormal];
myButton.titleLabel.font = [UIFont boldSystemFontOfSize:18];
[myButton setBackgroundImage:[[UIImage imageNamed:@"myImage.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0] forState:UIControlStateNormal];
[myButton addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
[myUIView addSubView:myButton];

Egal was ich versuche, ist die Schrift immer weiß. Was kann ich tun, um die schriftart zu ändern ' s Farbe?

InformationsquelleAutor Demasterpl | 2012-10-18
Schreibe einen Kommentar