Re: get class of a method
Re: get class of a method
- Subject: Re: get class of a method
- From: Kyle Sluder <email@hidden>
- Date: Sun, 22 Feb 2015 12:16:17 -0600
On Sun, Feb 22, 2015, at 12:11 PM, Jens Alfke wrote:
>
> > On Feb 22, 2015, at 9:30 AM, Kyle Sluder <email@hidden> wrote:
> >
> > The compiler does keep type info for properties, but that’s not actually documented.
>
> It’s documented in the “Declared Properties” section of the “Objective-C
> Runtime Programming Guide”:
>
> You can use the property_getAttributes function to discover the name,
> the @encode type string of a property, and other attributes of the property.
The documented @encode format does not contain static type information
for ObjC types:
<https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html>
The fact that the string returned by property_getAttributes *does*
contain static type information is an undocumented extension.
--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