Check if there is an emoji contained in a string

后端 未结 11 1213
野的像风
野的像风 2020-12-31 11:49

I am getting the text size of a string with this

textSize = [[tempDict valueForKeyPath:@\"caption.text\"] sizeWithFont:[UIFont systemFontOfSize:12] constrain         


        
11条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 12:20

    @Simha.IC answer is great.

    However it does not work with the new iOS 9.1 emojis'.

    Simha.IC snippet is not detecting these ones:

提交回复
热议问题