У меня два NSStrings: orgText
и searchLetter
.
Я хочу выделить все вхождения searchLetter в orgText
с красным цветом.
Как я могу получить NSRange
всех вхождений searchLetter
?
например:
suppose: orgText = "abcahaiapaoiuiapplma"
searchLetter = "a".
Я хочу зажечь все "а" в "abcahaiapaoiuiapplma" с красным цветом.
Спасибо.