-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Object from Class? #106
Comments
You can't really, since there is not a one-to-one relationship between these two. An object has one class, but a class can have many objects (called instances). You can however create a new object from a class by simply sending let cls = class!(NSObject);
let obj: Object = msg_send![cls, new]; |
80 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @SSheldon 👋😀,
Thanks for this awesome library! I'd sponsor it if you turned on GitHub Sponsors 💖
Also, GitHub Discussion is a nice feature and would probably be better for the question I'm asking here:
Can you get an
Object
from aClass
or can you only go the other direction?Thank you, 🙇🏻♂️
The text was updated successfully, but these errors were encountered: