UINavigationBar标题字体更改

时间:2015-07-15 09:21:22

标签: ios xcode fonts uinavigationbar

我在导航栏标题中使用了两种字体。一个是Eurostile,另一个是Museo Sans。对于我的主屏幕,我使用的是Eurostile,其余的屏幕我正在使用Museo Sans字体。我使用以下代码设置主屏幕标题字体。

[[UINavigationBar appearance] setTitleTextAttributes: @{
  UITextAttributeTextColor: [UIColor whiteColor],
  UITextAttributeFont: [UIFont fontWithName:@"Eurostile" size:25.0f]
 }];

我面临的问题是,当我加载应用程序时,在主屏幕中它正确显示Eurostile字体。打开模态视图控制器后,当我关闭它时,主屏幕字体立即变为Museo Sans字体......它没有在主屏幕中正确显示Eurostile字体。

ImagesGallery *galleryViewControler = [[ImagesGallery alloc] init];
galleryViewControler.LoginID= LoginID;
galleryViewControler.LoginUsername= LoginUserName;
galleryViewControler.delegate = self;
[self presentModalViewController:galleryViewControler animated:YES];

即使导航到其他视图后,我也希望在Home Screen中使用Eurostile字体。在这方面,任何人都可以帮助我。

1 个答案:

答案 0 :(得分:0)

我测试了您的project framework,我不相信您的test没有合理定位。

在我的{{1}}中,我会告诉你我的意思:

Setting a time limit when recording an audio clip? step01 set <code>nav1</code>'s font set <code>nav2</code>'s font