我使用此代碼將按鈕顯示爲導航欄的標題,然後在按鈕代碼中編寫代碼以更改解除壓縮文本標籤的字體。但是我沒有得到正確的字體版本與下面的代碼。更改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