• 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: get class of a method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get class of a method


  • Subject: Re: get class of a method
  • From: Ken Thomases <email@hidden>
  • Date: Sun, 22 Feb 2015 15:13:46 -0600

On Feb 22, 2015, at 3:01 PM, Jack Brindle <email@hidden> wrote:

> Doesn’t [self class] do this? The method is within whatever self is, so it seems appropriate that [self class]
> would provide what you want.

Although the subject wasn't clear, the body makes it clear he's looking for the return type of a method.

But even if he were looking for the class which implemented the method, [self class] would not be correct.  That returns the dynamic type of the object, which may be a subclass of the class which implemented the method.

Regards,
Ken


_______________________________________________

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


References: 
 >get class of a method (From: BareFeetWare <email@hidden>)
 >Re: get class of a method (From: Jack Brindle <email@hidden>)

  • Prev by Date: Re: get class of a method
  • Next by Date: Re: Color fun with IBOutlet named "appNameLabel"
  • Previous by thread: Re: get class of a method
  • Next by thread: Re: get class of a method
  • Index(es):
    • Date
    • Thread