我有这个代码 NSString *nextSequentialFile = [filePath stringByReplacingOccurrencesOfString:photoNumber withString:[NSString stringWithFormat:@"%d", (index + 1)] options:NSBackwardsSearch range:[filePath rangeOfString:photoNumber options:NSBackwardsSearch]]; 但我有这个错误,我不明白这是发生。 Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFString replaceOccurrencesOfString:withString:options:range:]: Range or index out of bounds'