I know to find class type from class name we can do something as shown below or can use NSClassFromString. Can we do similar thing for structs, enums or any other data type?
guard let classType = Bundle.main.classNamed("AppName.ClassName") as? ClassName.Type else {
print("Class Type not found")
return
}
My question is similar to this one Swift language NSClassFromString . Only difference is I want to know can we do it for other data types as well like structs and enums.