zoukankan      html  css  js  c++  java
  • UI常用字体定义和继承的实例,ResearchKitCode

     

    #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

  • 相关阅读:
    作业11
    作业10总结
    作业10
    作业9总结
    作业9
    作业8总结
    作业8
    实验7总结
    实验6总结
    史航第12次作业&总结
  • 原文地址:https://www.cnblogs.com/wcLT/p/4693556.html
Copyright © 2011-2022 走看看