I want to limit UILabel.text in 8 Chinese word or 16 English word, and if the text is larger than this, use "..." to replace the redundant place.
I tried to count String size, but I don't know how to deal with both English words and Chinese words. Because is I count bytes by utf8, the Chinese word would be triple than English words. (Considering the label might have both Chinese word and English words, it's hard to calculate.)
for example:
1."Batman like cat Woman and Alfred." should look like "Batman like cat..."
2."蝙蝠侠喜欢猫女和阿福" should look like "蝙蝠侠喜欢猫女和..."
3."Batman喜欢猫女和阿福" should look like "Batman喜欢猫女和..."
I know Android has a property to do this, how about Swift?
Lookingforward for your response, and sorry for my poor English description.