I have this question here (as well other quesrtions on SO), and the Apple docs about Objective-C collections and fast enumeration. What is not made clear is if an NSArray
populated with different types, and a loop is created like:
for ( NSString *string in myArray )
NSLog( @"%@\n", string );
What exactly happens here? Will the loop skip over anything that is not an NSString
? For example, if (for the sake of argument) a UIView
is in the array, what would happen when the loop encounters that item?