Ich versuche, die Standardschriftart der Schaltfläche Zurück in UINavigationController in eine benutzerdefinierte Schriftart zu ändern
UIFont *myCustomFont = [UIFont fontWithName:@"MyCustomFont" size:18];
Wie kann ich diese benutzerdefinierte Schriftart auf die Schaltfläche "Zurück" setzen? Ich habe andere Antworten auf ähnliche Fragen auf dieser Website ohne Erfolg durchsucht.
Antworten:
3 für die Antwort № 1[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:
@{UITextAttributeTextColor:[UIColor blackColor],
UITextAttributeTextShadowOffset:[NSValue valueWithUIOffset:UIOffsetMake(0, 1)],
UITextAttributeTextShadowColor:[UIColor whiteColor],
UITextAttributeFont: myCustomFont
}
forState:UIControlStateNormal];