ClearTextLabel 1.0.1

ClearTextLabel 1.0.1

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2014年12月

Tarun Tyagi维护。



  • 作者:
  • Tarun Tyagi

ClearTextLabel - iOS (Objective-C)

ClearTextLabel是一个创建带有透明文字标签的UILabel子类。

要求

  • iOS 6.0或更高版本
  • CoreFoundation.framework
  • CoreText.framework
  • QuartzCore.framework
  • ARC(项目是ARC或使用-fobjc-arc配置了ClearTextLabel)

安装

  • 想要使用pod,只需将以下行添加到您的podfile中
pod 'ClearTextLabel'
  • 您可能希望直接复制源文件,完全由您自己决定。

如何使用

使用ClearTextLabel与使用常规UILabel一样简单

ClearTextLabel* objCTLbl = [[ClearTextLabel alloc] initWithFrame:CGRectMake(20, 100, 280, 368)];
objCTLbl.text = @"Can this be drawn with transparency ?";
[self.view addSubview:objCTLbl];

ClearTextLabel使用透明度绘制提供的文本。

  • 它使用CoreGraphics上下文绘制字符的CGPath。
  • 字符的CGPath是什么?那么CoreText在哪里呢?

外观

Screenshot

演示应用程序

Demo app includes the most basic regular example just for reference.