Swift 2 - Check Type of empty Array (Introspection)
问题 I'm currently working on introspection in Swift 2 and have Problems getting the specific type for an Array (in this example an Array<String> ). var prop = obj.valueForKey("strings")! if prop is Array<String> { println("true") } if prop is Array<Int> { println("true") } Output is: true true while it should be true false Is there a way to find out the type for the members of the Array? For example, if I daclared the Array as Array<String> I want to get String or at least be able to check if it