是否可以将标签的字体大小更改为MDCTabBar?
MDCTabBar是谷歌库中使用iOS设计素材的一部分
https://github.com/material-components/material-components-ios
答案 0 :(得分:-1)
CGFloat width = [UIScreen mainScreen].bounds.size.width;
UIFont *font = [MDCTypography buttonFont];
if (width <= 320.0) {
font = [UIFont fontWithName:@"Dosis-Medium" size:12];
} else if (width <= 375.0) {
font = [UIFont fontWithName:@"Dosis-Medium" size:14];
} else {
font = [UIFont fontWithName:@"Dosis-Medium" size:15];
}
self.tabBar.unselectedItemTitleFont = font;
self.tabBar.selectedItemTitleFont = font;