Latest 0.0.1
Homepage https://github.com/nhfc99/NHFLabel
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, CoreGraphics, UIKit
Authors

介绍

用于对UILabel的一个扩展

安装

  • pod ‘NHFLabel’
  • 手动下载然后将文件夹拖至工程中即可

使用方法

/**

  • 获取自适应大小,默认的宽度为320
  • @param content
  • @param font
  • @return
    */

    • (CGSize)labelConstrainedToSize:(NSString)content font:(UIFont)font;

/**

  • 根据宽度来进行实现默认的大小
  • @param width
  • @param content
  • @param font
  • @return
    */

    • (CGSize)labelConstrainedHeightByWidth:(CGFloat)width content:(NSString)content font:(UIFont)font;

/**
获取最大的宽度

@param list
@param font

@return
*/

  • (CGFloat)getMaxWidthBy:(NSArray )list
    byFont:(UIFont
    )font;

Latest podspec

{
    "name": "NHFLabel",
    "version": "0.0.1",
    "summary": "u7528u4e8eu5bf9UILabelu7684u4e00u4e2au6269u5c55",
    "homepage": "https://github.com/nhfc99/NHFLabel",
    "license": "MIT",
    "authors": {
        "u725bu5b8fu98de": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nhfc99/NHFLabel.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "UILabel+unit/*.{h,m}",
    "frameworks": [
        "Foundation",
        "CoreGraphics",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This