• 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
Re: Trouble calling class_addIvar()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble calling class_addIvar()


  • Subject: Re: Trouble calling class_addIvar()
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 8 Oct 2010 16:42:18 -0700

On Fri, Oct 8, 2010 at 4:39 PM, Rick Mann <email@hidden> wrote:
> I'm trying to add an ivar to a (sub)class in the base class' +initialize method. I'm not sure if it's too late to do it at this point or not. If I can't do it here, i don't know where to make the call.

>From the documentation:

"Adding an instance variable to an existing class is not supported."

http://developer.apple.com/library/ios/#documentation/cocoa/reference/ObjCRuntimeRef/Reference/reference.html

Use objc_setAssociatedObject instead.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Trouble calling class_addIvar()
      • From: Rick Mann <email@hidden>
References: 
 >Trouble calling class_addIvar() (From: Rick Mann <email@hidden>)

  • Prev by Date: Trouble calling class_addIvar()
  • Next by Date: Re: Trouble calling class_addIvar()
  • Previous by thread: Trouble calling class_addIvar()
  • Next by thread: Re: Trouble calling class_addIvar()
  • Index(es):
    • Date
    • Thread