如何更改UIBarButtonItem中字体的大小?
答案 0 :(得分:4)
您可以使用以下代码轻松实现此目的:
barButtonName.title = @"SOME TEXT TO DISPLAY";
[barButtonName setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont boldSystemFontOfSize:15<=SIZE YOU WANT], UITextAttributeFont,nil] forState:UIControlStateNormal];