如:
if (textView.text.length > 10)
{
textView.text = [textView.text substringToIndex:10];
}
NSMutableRLEArray replaceObjectsInRange:withObject:length:: Out of bounds',次问题由汉字联想引起,
修改为,加判断条件
if (textView.text.length > 10 && textView.markedTextRange == nil)
{
textView.text = [textView.text substringToIndex:10];
}
ok了。