How to achieve reflection in Swift Language?
How can I instantiate a class
[[NSClassFromString(@"Foo") alloc] init];
You must put @objc(SwiftClassName) above your swift class. Like:
@objc(SwiftClassName)
@objc(SubClass) class SubClass: SuperClass {...}
2.1m questions
2.1m answers
60 comments
57.0k users