[英]Can't set font for Navigation Bar in Storyboard of Xcode
只需將Custom更改為System並再次更改為Custom。 我不知道為什么,但這對我有用!
如果您希望所有項目中的字體只是將其添加到didFinishLaunchingWithOptions,您可以添加帶代碼的自定義字體
[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], NSForegroundColorAttributeName,
[UIFont fontWithName:@"fontname" size:24.0], NSFontAttributeName, nil]];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.