首页 > 其他 > 详细

UI常用字体定义和继承的实例,ResearchKitCode

时间:2015-08-01 07:43:25      阅读:223      评论:0      收藏:0      [点我收藏+]

 

#import <UIKit/UIKit.h>

 

@interface UIFont (APCAppearance)

 

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

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

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

+ (UIFont*) appNavBarTitleFont;

+ (UIFont*) appQuestionLabelFont;

+ (UIFont*) appQuestionOptionFont;

 

@end

 

 

#import "UIFont+APCAppearance.h"

#import "APCAppearanceInfo.h"

#import "APCConstants.h"

 

@implementation UIFont (APCAppearance)

 

+ (UIFont*) appRegularFontWithSize: (CGFloat) size

{

    return [UIFont fontWithName:[APCAppearanceInfo valueForAppearanceKey:kRegularFontNameKey] size:size];

}

 

+ (UIFont*) appMediumFontWithSize: (CGFloat) size

{

    return [UIFont fontWithName:[APCAppearanceInfo valueForAppearanceKey:kMediumFontNameKey] size:size];

}

 

+ (UIFont*) appLightFontWithSize: (CGFloat) size

{

    return [UIFont fontWithName:[APCAppearanceInfo valueForAppearanceKey:kLightFontNameKey] size:size];

}

 

+ (UIFont*) appNavBarTitleFont {

    return [UIFont appMediumFontWithSize:17.0f];

}

 

+ (UIFont*) appQuestionLabelFont {

    return [UIFont appRegularFontWithSize:17.0f];

}

 

+ (UIFont*) appQuestionOptionFont {

    return [UIFont appRegularFontWithSize:44.0f];

}

 

@end

UI常用字体定义和继承的实例,ResearchKitCode

原文:http://www.cnblogs.com/wcLT/p/4693556.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!