J'ai un NSMutableAttributedString, je dois prendre de it.I substring utiliser le code suivant pour prendre substring,Hors limites problème attributedSubstringFromRange
startIndex et endIndex sont deux variables longues.
NSMutableAttributedString *currentString = (NSMutableAttributedString *)[attributtedString attributedSubstringFromRange:NSMakeRange(startIndex, endIndex)];
Mais il y a une exception si l'indice aller plus haut. La longueur de la chaîne est toujours - 21212 je peux obtenir une sortie quand je Les valeurs données (9048, 10958) Mais après quand j'ai donné des valeurs (10958, 12961), il y a une exception,
NSConcreteMutableAttributedString attributedSubstringFromRange:: Out of bounds
aide moi résoudre ce problème, ou me donner une meilleure façon de prendre à partir d'un sous-chaîne NSMutableAttributedString
merci à l'avance,