2014-10-05 32 views

回答

2

UITableViewCell的删除按钮中使用系统字体。所以,如果你想改变系统字体在您的应用程序只覆盖-systemFontOfSize:(CGFloat)fontSize

创建UIFont+System类别,并将在代码里.m

#pragma clang diagnostic push 
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation" 

+ (UIFont *)systemFontOfSize:(CGFloat)fontSize { 
    return [UIFont fontWithName:@"NameOfYourFont" size:fontSize]; 
} 

#pragma clang diagnostic pop 
0

也许看看this question

你可以使用一个像你想要的字体,然后将按钮设置了此图像。如果你有不同的语言,可能会有问题

-1

你可以采取的

UIButton * buttonAppearance = [UIButton appearanceWhenContainedInInstancesOfClasses:@[[YourCustomCell class]]]; 
[buttonAppearance setAttributedTitle: attributedString forState: UIControlStateNormal]; 

注的优势:这会将标题设置为单元格中的所有按钮。如果需要,您可以更改它。

+0

似乎没有在iOS 11中工作。不知道它是否工作过 – markturnip 2017-11-29 02:37:04