Class or struct from string? http://inessential.com/2015/07/20/swift_diary_1_class_or_struct_from_str …
@mjtsai @owensd @brentsimmons Good question. I assumed it was only looking up @objc Swift classes.
-
-
@danielpunkass@owensd@brentsimmons The example he gave seems to use pure Swift classes. -
@mjtsai@danielpunkass@brentsimmons very interesting; they may be unifying the runtime more than I imagined they would. -
@owensd@mjtsai@brentsimmons Maybe something they are chipping away at? From lldb stopped in Swift code…pic.twitter.com/Ol9cpVDX14
-
@danielpunkass@owensd@mjtsai@brentsimmons NSClassFromString will only find classes, and needs a module-qualified name. -
@jckarter@danielpunkass@owensd@brentsimmons Can we rely on it finding classes going forward? - View other replies
-
@mjtsai@danielpunkass@owensd@brentsimmons Yeah, all Swift classes get registered with the ObjC runtime. - View other replies
-
@jckarter Wow, that is super cool. Thanks for clarifying. -
@mjtsai@jckarter Indeed, very cool. Am I misunderstanding modules, shouldn’t po NSClassFromString("http://Swift.Int ") Work? It Nils - View other replies
- Show more
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Brent Simmons
David Owens II
Michael Tsai
Daniel Jalkut
Joe Groff