I am trying to remove any elements from an NSMutableArray object that contain a SPACE using the following:
[searchCriteria removeObject:[NSString stringWithString:@" "]];
I get the exception "-[__NSArrayI removeObject:]: unrecognized selector sent to instance". What am I doing wrong?
EDIT: OK, so I tried the following
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"SELF NOT CONTAINS ' '"];
NSArray *nonEmptyElements = [searchCriteria filteredArrayUsingPredicate: predicate];
and get the error Unable to parse the format string "SELF NOT CONTAINS ' '"'
How do I specify an empty string after the CONTAINS?