由于UI设计师给的UI稿中,需要使用MediumFont,所以专门Google了下。
Demo地址:https://github.com/y1024/iOSDemo/tree/master/MediumFont
iOS8.4效果图:

iOS9.3效果图:

iOS10.2.效果图:

iOS8.4设置无效果。
// 设置 MediumFont
- (UIFont*)mediumFont:(CGFloat)size {
#warning UIFontWeightMedium NS_AVAILABLE_IOS(8_2)
UIFont *font = [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
return font;
}
// 设置 BoldFont
- (UIFont*)boldFont:(CGFloat)size {
UIFont *font = [UIFont boldSystemFontOfSize:size];
return font;
}
网友评论