I have a class that has a method:
-(NSInteger) getCityCountForState:(NSString *)state CityArray:(NSMutableArray *)cityArray {
NSInteger count = 0;
City *city = [[City alloc] init];
for(city in cityArray)
{
if (city.state == state)
{
count++;
}
}
return count;
}
That method is called from elsewhere in the same class:
count = [getCityCountForState:state CityArray:appDelegate.cities];
This gives the error "'getCityCountForState' undeclared (first use in this function)"
I have also tried:
count = [self.getCityCountForState:state CityArray:appDelegate.cities];
This gives the error "request for member 'getCityCountForState' in something not a structure or union"
I'm obviously missing something obvious...but I can't figure out what it is.