jeudi 5 mars 2015

Dynamic width for a character in a String

I have a UITextViewwith arabic text in my App. In text, each arabic word is a character. Obviously the words (characters) are different in width. One functionality of the App is to replace random words in the text with hyphens. Currently, length of each line is similar in size and properly aligned and it should be always. So, the issue is, whenever I replace any word with hyphen, the length and alignment of the line is getting messed up. One solution is, we have to give a hyphen which is similar in word width. So can we change size of hyphen dynamically? Or can we do anything with underline by setting its color black and words color as background color say white (then it will be invisible)? Or any other solution to achieve this? Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire