Why does fast enumeration not skip the NSNumbers when I specify NSStrings?
问题 I thought that I knew how to use fast enumeration, but there is something I don't understand about it. If I create three NSString objects and three NSNumber objects and put them in an NSMutableArray : NSString *str1 = @"str1"; NSString *str2 = @"str2"; NSString *str3 = @"str3"; NSNumber *nb1 = [NSNumber numberWithInt:1]; NSNumber *nb2 = [NSNumber numberWithInt:2]; NSNumber *nb3 = [NSNumber numberWithInt:3]; NSArray *array = [[NSArray alloc] initWithObjects:str1, str2, str3, nb1, nb2, nb3, nil