[swift-users] Reflection in Swift 3?
Rick Mann
rmann at latencyzero.com
Sun Nov 13 00:38:46 CST 2016
So, it seems there's still no way to do something like instantiate a class given only its name (as a String)?
In my situation, I have a number of subclasses (or protocol implementations), which parallel some other class hierarchy. I need to dynamically create one based on the name of another. I don't want the latter classes to "know" anything about the former.
Thanks,
--
Rick Mann
rmann at latencyzero.com
More information about the swift-users
mailing list