I have an array of SomeClass
which is the super class of various other classes.
The array has all of those random classes in it.
Is there a way using switch (as opposed to else if let something = elm as? TheSubClassType
)
In pseudo code:
for AObjectOfTypeSomeClass in MyBigArray{
switch the_type_of(AObjectOfTypeSomeClass){
case SubClass1:
let O = AObjectOfTypeSomeClass as! SubClass1
...
...
...
}
}