Ändern der UITextField-Platzhalterschriftart

Ich bin ändern der Platzhalter-text Farbe mit dem folgenden code, aber wenn ich versuche, um NSFontAttribute bekomme ich den compiler-Fehler "too many arguments to method call, expect 2 have 3"

 UIColor *color = [UIColor blackColor];
        _nameField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"Your Name" attributes:@{NSForegroundColorAttributeName: color},@{NSFontAttributeName:@"Roboto-Bold"}]; 

Dies Funktioniert Gut:

 UIColor *color = [UIColor blackColor];
        _nameField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"Your Name" attributes:@{NSForegroundColorAttributeName: color}]; 

InformationsquelleAutor der Frage Bob Yousuk | 2013-08-15

Schreibe einen Kommentar