NSArray *pets = [NSArray arrayWithObjects:@"Kot", @"Pies", @"Szczur", nil];
NSString *valueWeAreLookingFor = @"Ryby";

int i;
BOOL found = NO;

for (i = 0; i < [pets count]; i++) 
{
   if ([[pets objectAtIndex:i] isEqual:valueWeAreLookingFor]) 
   {
      found = YES; 
      break;
   }
}

if (found)
{
   NSLog(@"Element '%@' został znaleziony w tablicy", valueWeAreLookingFor);
} else {
   NSLog(@"Element '%@' nie został znaleziony w tablicy", valueWeAreLookingFor);
}
