Checking if an object is a given type in Swift

I have an array that is made up of AnyObject. I want to iterate over it, and find all elements that are array instances.

How can I check if an object is of a given type in Swift?

20 Answers
20

Leave a Comment