自定义字体,让字体统一

.h文件


#import@interface AppStyleConfigure : NSObject

/**

*  获取统一字体

*

*  @return <#return value description#>

*/

+(UIFont*)getAppFont:(CGFloat)size;

+(UIFont*)getAppBoldFont:(CGFloat)size;

@end


.m文件




#import "AppStyleConfigure.h"

@implementation AppStyleConfigure

/**

*  获取统一字体

*

*  @return return value description

*/

+(UIFont*)getAppFont:(CGFloat)size{

if (kMainScreen_width < 370) {

size = size - 1;

size = (size<11) ? 11:size;

return [UIFont fontWithName:@"Arial" size:size];

}else{

return [UIFont fontWithName:@"Arial" size:size];

}

}

+(UIFont*)getAppBoldFont:(CGFloat)size{

if (kMainScreen_width < 370) {

size = size - 1;

size = (size<11) ? 11:size;

return [UIFont fontWithName:@"Arial-BoldMT" size:size];

}else{

return [UIFont fontWithName:@"Arial-BoldMT" size:size];

}

}

@end

你可能感兴趣的:(自定义字体,让字体统一)