我有这个代码来显示按钮作为导航栏的标题,然后在按钮代码中我编写代码来更改取消按钮文本标签的字体。但我没有使用下面的代码获得正确的字体版本。
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 georgia,但我没有得到正确的字体谢谢。