We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How can I cast a INSObject to a objc::runtime::Object?
INSObject
objc::runtime::Object
The text was updated successfully, but these errors were encountered:
INSObject is a trait, so, you wouldn't.
But you can cast an implementation, e.g. NSObject or NSString:
NSObject
NSString
let obj: Id<NSObject> = NSObject::new(); let obj_ref: &NSObject = &*obj; let obj_ptr: *const NSObject = obj_ref; let ptr: *const objc::runtime::Object = obj_ptr as *const objc::runtime::Object; // Or short: let obj = NSObject::new(); let ptr = &*obj as *const _ as *const objc::runtime::Object;
Sorry, something went wrong.
No branches or pull requests
How can I cast a
INSObject
to aobjc::runtime::Object
?The text was updated successfully, but these errors were encountered: