-
Notifications
You must be signed in to change notification settings - Fork 44
/
Emoji.m
29 lines (26 loc) · 842 Bytes
/
Emoji.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// Emoji.m
// Emoji
//
// Created by Aliksandr Andrashuk on 26.10.12.
// Copyright (c) 2012 Aliksandr Andrashuk. All rights reserved.
//
#import "Emoji.h"
#import "EmojiEmoticons.h"
#import "EmojiMapSymbols.h"
#import "EmojiPictographs.h"
#import "EmojiTransport.h"
@implementation Emoji
+ (NSString *)emojiWithCode:(int)code {
int sym = EMOJI_CODE_TO_SYMBOL(code);
return [[NSString alloc] initWithBytes:&sym length:sizeof(sym) encoding:NSUTF8StringEncoding];
}
+ (NSArray *)allEmoji {
NSMutableArray *array = [NSMutableArray new];
[array addObjectsFromArray:[EmojiEmoticons allEmoticons]];
[array addObjectsFromArray:[EmojiMapSymbols allMapSymbols]];
[array addObjectsFromArray:[EmojiPictographs allPictographs]];
[array addObjectsFromArray:[EmojiTransport allTransport]];
return array;
}
@end