NSString * myText = @"This is my really long text view";
NSUInterger textLenght = [myText length]; //NSLog 32
如何在所选长度位置插入任何文本。例如,长度为 10?
我试过这个,但它不起作用!
NSRange textRange = [myText rangeOfComposedCharacterSequenceAtIndex:10];
[myText stringByReplacingCharactersInRange:textRange withString:@"NEW"];