Not showing smily ( Emoji ) in in UITextView in iOS?

后端 未结 2 1501
北恋
北恋 2021-01-07 13:44

I have stored all uni-codes(emoji characters) in plist supported by iphone. When i write directly as

- (IBAction)sendButtonSelected:(id)sender {
NSMutableArr         


        
2条回答
  •  萌比男神i
    2021-01-07 14:17

    The \uxxxx notation is only interpreted by the compiler (as the source code is usually in ASCII or MacRoman or whatever but not often UTF8)

    Plist files uses the characters directly, and are encoded in UTF8. So you should insert the emoji character itself into the plist directly, instead of using the \uxxxx notation, as the Plist data will be read as-is.

    Lion and Mountain Lion Keyboard palettes contains emoji characters directly, so that should not be difficult to insert the characters when editing the PLIST anyway.

提交回复
热议问题