The options:NSCaseInsensitiveSearch is crashing my app when I have it in the following. Does anyone know why this might be?
NSString* string3 = [[[[tvQ.text stringByReplacingOccurrencesOfString:@"\n"
withString:@" " options:NSCaseInsensitiveSearch range:wholeString]
stringByReplacingOccurrencesOfString:@"&" withString:@"and"]
stringByReplacingOccurrencesOfString:@"ç" withString:@"c"]
stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
Error from X-Code: error: 'wholeString' no开发者_StackOverflow中文版t defined
shouldn't your 'wholeString' be a string which you have to declare before the call of this function? or, if you want to search the whole string, then shouldn't it be your tvQ.text ?
精彩评论