Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diy/nsstringemojize
A category on NSString to convert Emoji Cheat Sheet codes to their equivalent Unicode characters
https://github.com/diy/nsstringemojize
Last synced: about 1 month ago
JSON representation
A category on NSString to convert Emoji Cheat Sheet codes to their equivalent Unicode characters
- Host: GitHub
- URL: https://github.com/diy/nsstringemojize
- Owner: diy
- License: other
- Created: 2013-01-30T18:57:29.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T20:08:35.000Z (over 7 years ago)
- Last Synced: 2024-12-01T22:36:56.980Z (about 1 month ago)
- Language: Objective-C
- Size: 257 KB
- Stars: 637
- Watchers: 39
- Forks: 78
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ios-star - NSStringEmojize - A category on NSString to convert Emoji Cheat Sheet codes to their equivalent Unicode characters. (Text / Other Testing)
- awesome-ios - NSStringEmojize - A category on NSString to convert Emoji Cheat Sheet codes to their equivalent Unicode characters. (Text / Other Testing)
README
## NSString+Emojize
#### A category on NSString to turn codes from [Emoji Cheat Sheet](http://www.emoji-cheat-sheet.com/) into Unicode emoji characters.## Getting Started
In order to use NSString+Emojize, you'll want to add the entirety of the `NSString+Emojize` directory to your project. To get started, simply:
```objective-c
#import "NSString+Emojize.h"
``````objective-c
NSString *emojiString = @"This comment has an emoji :mushroom:";
NSLog(@"%@", [emojiString emojizedString]);
```---
## Methods
```objective-c
- (NSString *)emojizedString;
+ (NSString *)emojizedStringWithString:(NSString *)aString;
```---
## iOS Support
NSString+Emojize is tested on iOS 5 and up. Older versions of iOS may work but are not currently supported.## ARC
NSString+Emojize uses ARC. If you are including NSString+Emojize in a project that **does not** use [Automatic Reference Counting (ARC)](http://developer.apple.com/library/ios/#releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html), you will need to set the `-fobjc-arc` compiler flag on all of the NSString+Emojize source files. To do this in Xcode, go to your active target and select the "Build Phases" tab. Now select all NSString+Emojize source files, press Enter, insert `-fobjc-arc` and then "Done" to enable ARC for NSString+Emojize.