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

  • 相关阅读:
    Mybatis懒加载
    Mybatis 动态SQL
    Mybatis的多表查询
    linux selinux
    linux find/vi复制粘贴
    01-oracle限定查询-20190404
    awk
    sed
    windows删除指定日期前的文件
    win10 sshsecureshellclient删除profile保存的信息
  • 原文地址:https://www.cnblogs.com/wcLT/p/4693556.html
Copyright © 2011-2022 走看看