 <p>Are you trying to do different things if the objects in the array are of different classes? You could do something like this:</p> <pre><code>for (id obj in myArray) { // Generic things that you do to objects of *any* class go here. if ([obj isKindOfClass:[NSString class]]) { // NSString-specific code. } else if ([obj isKindOfClass:[NSNumber class]]) { // NSNumber-specific code. } } </code></pre>