I got a warning message in
NSCharacterSet *myCharSet3 = [NSCharacterSet characterSetWithCharactersInString:query3];
int chr_count3;
chr_count3=[myCharSet3 count];
How to fix that warning ?
I got a warning message in
NSCharacterSet *myCharSet3 = [NSCharacterSet characterSetWithCharactersInString:query3];
int chr_count3;
chr_count3=[myCharSet3 count];
How to fix that warning ?
specifically, NSCharacterSet
instances do not respond to the selector count
.
if you implemented count
as a category method (which should be prefixed to avoid collisions), then you will need to include that header file which declares it.
attempts to call this method at runtime will raise an exception.
NSCharacterSet does not officially provide a count method. However in my testing, [myCharSet3 count] actually gives the correct result. So just to get rid of the warning:
chr_count3 = (int)[myCharSet3 performSelector:@selector(count)];
But I don't think it's a good idea.