Convert numbers to # define Emoji_code_to_symbol ((((0x808080f0 | (x & 0x3f000) >> 4) | (x & 0XFC0) << 10) | (x & 0x1c0000) << 18) | (x & 0x3F) << 24);
-(void) viewdidload { [super viewdidload]; Call int sym = Emoji_code_to_symbol (0x1f600) separately; NSString *emot = [[NSString alloc] initwithbytes:&sym length:sizeof (sym) encoding:nsutf8stringencoding]; NSLog (@ "arr==%@", emot); Gets the array nsarray *arremotion = [self defaultemoticons]; For (NSString *str in arremotion) { NSLog (@ "===%@", str);} }
Gets the default emoticon array-(Nsarray *) defaultemoticons { Nsmutablearray *array = [Nsmutablearray new]; for (int i=0x1f600; i<=0x1f64f; i++) { if (i < 0x1f641 | | i > 0x1f644) { int sym = Emoji_code_to_symbol (i ); NSString *emot = [[NSString alloc] initwithbytes:&sym length:sizeof (sym) encoding:nsutf8stringencoding]; [Array Addobject:emot]; } } return array;}
2015-03-03 18:30:11.251 mytest02[5948:3164472] arr==iOS development, System self-expression acquisition