https://github.com/kgn/uiimage-vector
UIImage category for dealing with vector formats like PDF and icon fonts.
https://github.com/kgn/uiimage-vector
Last synced: over 1 year ago
JSON representation
UIImage category for dealing with vector formats like PDF and icon fonts.
- Host: GitHub
- URL: https://github.com/kgn/uiimage-vector
- Owner: kgn
- License: mit
- Created: 2013-09-09T00:12:36.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2016-06-10T16:49:10.000Z (about 10 years ago)
- Last Synced: 2025-04-11T00:24:10.329Z (over 1 year ago)
- Language: Objective-C
- Size: 12.7 KB
- Stars: 72
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.markdown
- License: LICENSE
Awesome Lists containing this project
README
# UIImage-Vector
UIImage category for dealing with vector formats like PDF and icon fonts.
## Usage
Use an icon font:
``` objc
UIFont *font = [UIFont fontWithName:@"MyIconFont" size:28.0f];
UIImage *gear = [UIImage iconWithFont:font named:@"gear"
withTintColor:[UIColor whiteColor] clipToBounds:NO forSize:28.0f];
```
Use a PDF:
``` objc
UIImage *gear = [UIImage imageWithPDFNamed:@"gear"
withTintColor:[UIColor whiteColor] forHeight:28.0f];
```
## Installation
Simply add the files in `UIImage-Vector` to your project and link `CoreText.framework`.