Iām used to using doesRespondToSelector:it instancesRespondToSelector:to determine at runtime whether objects have certain methods. However, when using Core Data, I do not see the expected behavior for my properties @dynamic. For example, if I have a property sortOrderin my class, I can use the Objective-C runtime to see that this property exists at run time. But if I ask the appropriate object Class, instancesRespondToSelector:I will be back NO. If I use the runtime to list the available methods, none of my dynamic getters / setters appear on the list, which is consistent, but not what I expected.
So my question is: without using a run-time check, is there an easy way to determine if an instance of a subclass responds to the NSManagedObjectgetter / setter selectors matching its properties @dynamic?
source
share