Say I have 2 subclasses of a class but would like to pass either of those subclasses to a function and determine its type within the function how would that be done?
class ParentClass {
...
}
class subClass1: ParentClass {
...
}
class subClass2: ParentClass {
...
}
function getClassType(type: ParentClass) {
return(type)
}
viewDidLoad...
getClassType(type: subClass2())