NSValue/initWithBytes
NSValue/initWithBytes
- Subject: NSValue/initWithBytes
- From: Roland Silver <email@hidden>
- Date: Thu, 27 Dec 2007 06:30:49 -0700
I think I can create an NSValue object for a pointer to structure using the class method valueWithPointer like this: struct Foo foo;
NSValue* value = [NSValue valueWithPointer:&foo]; //(1)
But I would like instead to create such a pointer using the init method for the class: NSValue* value = [[NSValue alloc] initWithBytes:val objCType:typ]; //(2)
Please tell me what val and typ I should use so that (2) produces the same value as (1). |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden