Closed J7mbo closed 6 years ago
Unfortunately I haven't found a way to safely initialize classes. If someone has a solution I'd welcome a PR.
I was messing around with it, but it seemed every class needed to extend NSObject
, with loads of @objc
markers everywhere.
However, once you do that, you can reflect on everything using objective c methods, even method signatures, arguments, their types etc. Unfortunately, you're writing more objective-c than swift then ;)
Thought I'd share it anyway. Maybe in the future we'll get better reflection support in swift. Closing until that point, thanks!
Any chance this can work with classes as well as structs? If not, is it because the functionality isn't possible, or just needs a PR?