CoreTextLabel 1.5.13

CoreTextLabel 1.5.13

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
Released最近发布2015年2月

[email protected] 维护。



 
依赖项
RegexKitLite~> 4.0
AFMacros>= 0
NSString-HTML>= 0
 

  • 作者
  • Daniel Kuhnke

使用CoreTextLabel,你能够在iOS(>= 5.0)应用程序中绘制带自定义字体和颜色的NSAttributedString或HTML。同时支持numberOfLinestruncationNSLineBreakByTruncatingTail)。

Build Status

示例

    CoreTextLabel * label  = [[CoreTextLabel alloc] initWithFrame:frame];
    label.html             = htmlString;
    [label sizeToFit];
    [self.view addSubview:label];



安装

将CoreTextLabel pod添加到你的Podfile中。

$ vim Podfile
platform :ios, '5.0'
pod 'CoreTextLabel', :head

然后,在你的项目中安装依赖项

$ pod install

记得在构建时始终打开Xcode工作空间而不是项目文件。

$ open App.xcworkspace

要求

CoreTextLabel 1.0及以上需要iOS 5.0及以上。

框架依赖项

  • QuartzCore
  • CoreText

ARC

CoreTextLabel使用ARC。

如果你在非ARC项目中使用CoreTextLabel,你需要将所有CoreTextLabel源文件的编译器标志设置为`-fobjc-arc`。

要在Xcode中设置编译器标志,请转到活动目标并选择“构建阶段”选项卡。现在选择所有CoreTextLabel源文件,按Enter键,插入`-fobjc-arc`或`-fno-objc-arc`,然后点击“完成”以启用或禁用CoreTextLabel的ARC。

致谢

CoreTextLabel由Daniel Kuhnkeappfarms GmbH & Co. KG创建。

许可证

CoreTextLabel在MIT许可证下可用。有关更多信息,请参阅LICENSE文件。