Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taruntyagi697/ClearTextLabel
UILabel subclass that renders see through text using CoreText, textColor is clearColor.
https://github.com/taruntyagi697/ClearTextLabel
Last synced: about 1 month ago
JSON representation
UILabel subclass that renders see through text using CoreText, textColor is clearColor.
- Host: GitHub
- URL: https://github.com/taruntyagi697/ClearTextLabel
- Owner: taruntyagi697
- License: mit
- Created: 2014-07-08T18:16:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-04T16:36:44.000Z (over 10 years ago)
- Last Synced: 2024-10-19T18:26:23.792Z (about 2 months ago)
- Language: Objective-C
- Size: 1.45 MB
- Stars: 192
- Watchers: 3
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-mobile-ui - taruntyagi697/ClearTextLabel
README
# ClearTextLabel - iOS (Objective-C)
`ClearTextLabel` is a `UILabel` subclass that creates a label with see-through text.
## Requirements
* iOS 6.0 or later
* CoreFoundation.framework
* CoreText.framework
* QuartzCore.framework
* ARC (either project is ARC or ClearTextLabel is compiled with `-fobjc-arc`)## Installation
* Want a pod for this, just add following line to your podfile-
```
pod 'ClearTextLabel'
```* You may wish to copy the source files directly, totally up to you.
## How To Use
Using ClearTextLabel is as simple as using regular UILabel :
```objective-c
ClearTextLabel* objCTLbl = [[ClearTextLabel alloc] initWithFrame:CGRectMake(20, 100, 280, 368)];
objCTLbl.text = @"Can this be drawn with transparency ?";
[self.view addSubview:objCTLbl];
```ClearTextLabel draws the text provided to it with transparency.
* It uses CoreGraphics Context to draw the letters' CGPath.
* Letters' CGPath, how ? Well what's CoreText there for ?## How It Looks
![Screenshot] (https://raw.githubusercontent.com/taruntyagi697/ClearTextLabel/master/Screenshot.png)
## Demo App
Demo app includes the most basic regular example just for reference.