Fora dos limites Problema com attributeSubstringFromRange

e você está procurando por uma solução para o seu problema, entre em contato com a nossa equipe de suport

startIndex e endIndex são duas variáveis longa

NSMutableAttributedString *currentString = (NSMutableAttributedString *)[attributtedString attributedSubstringFromRange:NSMakeRange(startIndex, endIndex)];

Mas há uma exceção se o índice aumentar. O comprimento da string é sempre - 21212 Eu posso obter saída quando forneci valores (9048, 10958) Mas depois disso, quando forneci valores (10958, 12961), há uma exceção

NSConcreteMutableAttributedString attributedSubstringFromRange:: Out of bounds

me ajude a resolver esse problema ou me dê uma maneira melhor de obter substring de um NSMutableAttributedString

desde já, obrigado

questionAnswers(1)

yourAnswerToTheQuestion