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

  • 相关阅读:
    HDU 1003 Max Sum
    HDU 1728 逃离迷宫
    UVA 10057 A midsummer night's dream.
    HDU 1232 畅通工程
    poj3331
    poj3481
    poj1053
    poj3281
    poj3199
    !!! Gridview的多种使用方法总结
  • 原文地址:https://www.cnblogs.com/wcLT/p/4693556.html
Copyright © 2011-2022 走看看