• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSValue/initWithBytes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSValue/initWithBytes
      • From: "Clark Cox" <email@hidden>
  • Prev by Date: Re: 64 bit continued
  • Next by Date: Re: NSValue/initWithBytes
  • Previous by thread: Re: 64 bit continued
  • Next by thread: Re: NSValue/initWithBytes
  • Index(es):
    • Date
    • Thread