我使用此代码将按钮显示为导航栏的标题,然后在按钮代码中编写代码以更改解除压缩文本标签的字体。但是我没有得到正确的字体版本与下面的代码。更改UINavigationBar标题的字体
UIButton *titleButton = [[UIButton alloc]init];
titleButton = [UIButton buttonWithType:UIButtonTypeCustom];
[titleButton setFrame:CGRectMake(0, 0, 170, 35)];
[titleButton setTitle:[NSString stringWithFormat:@"%@ %@",delegatee.selectedBook,delegatee.selectedChapter]forState:UIControlStateNormal];
titleButton.titleLabel.font =[UIFont fontWithName:@"Georgia" size:10.0f];
[titleButton addTarget:self action:@selector(ClickbtnChaperselection:)forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.titleView = titleButton;
iput格鲁吉亚,但我没有得到正确的字体 感谢。
查看我的更新回答 – Deepesh
如果认为你有字体问题,请检查你的项目中的字体名称 – Deepesh