开发者

UIBarButton font size

开发者 https://www.devze.com 2023-01-11 23:49 出处:网络
How can I change the size of the font 开发者_StackOverflow中文版in a UIBarButtonItem?You can easily achieve this using the following code:

How can I change the size of the font 开发者_StackOverflow中文版in a UIBarButtonItem?


You can easily achieve this using the following code:

barButtonName.title = @"SOME TEXT TO DISPLAY";
[barButtonName setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont boldSystemFontOfSize:15<=SIZE YOU WANT], UITextAttributeFont,nil] forState:UIControlStateNormal];
0

精彩评论

暂无评论...
验证码 换一张
取 消