iOS: Stellen Sie die Schriftgröße von UILabel programmgesteuert ein

Ich versuche, die Schriftgröße eines UILabels festzulegen. Egal welchen Wert ich lege, die Textgröße scheint sich nicht zu ändern. Hier ist der Code, den ich benutze.

[self setTitleLabel:[[UILabel alloc] initWithFrame:CGRectMake(320.0,0.0,428.0,50.0)]];
[[self contentView] addSubview:[self titleLabel]];
UIColor *titlebg = [UIColor clearColor];
[[self titleLabel] setBackgroundColor:titlebg];
[[self titleLabel] setTextColor:[UIColor blackColor]];
[[self titleLabel] setFont:[UIFont fontWithName:@"System" size:36]];

Antworten auf die Frage(8)

Ihre Antwort auf die Frage