I have a custom cell with an attribute called accessoryView.
From code I can do this:
NSObject* t2 = [cell valueForKey:@"accessoryView"];
NSObject* t3 = [t2 valueForKey:@"layer"];
NSObject* t4 = [t3 valueForKey:@"cornerRadius"];
All values are returned correctly.
When I add this in interface builder:
then I get a runtime error: [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key accessoryView.
I don't understand why that is the case. Is it not using the same mechanism to reference the property?
It's just layer.cornerRadius
, you dont include the name into keypath