设置UIButton字体
我有以下代码在UIButton中设置文本
[self.fullListButton_ setTitle:[NSString stringWithFormat:@"%d", [self.newsfeedItem_.newsfeedToSubjects count] - 3] forState:UIControlStateNormal];
问题是我似乎无法为此设置字体。 我该怎么做?
在较新版本的iOS中:
UIButton * myButton; myButton.titleLabel.font = [UIFont systemFontOfSize: 12];
或者任何其他的字体机制。
在这里寻找的UIButton部分:
在这里为UIFont的东西:
在你的代码中:
self.fullListButton_.titleLabel.font = [UIFont systemFontOfSize: 12];
要么
self.fullListButton_.titleLabel.font = [UIFont fontWithName:@"Arial" size:12];