I am using a external library and one of my view controller is registering as delegate for a class in that framework. Now, at one place I want to execute some code on this d
The property libraryController.delegate
is defined in the external library to conform to LibraryDelegate
. Try to downcast to MyExtendedDelegate
before you call the method from your extended protocol.
if ([self.libraryController.delegate conformsToProtocol:@protocol(MyExtendedDelegate)])
{
id extendedDelegate = (id)self.libraryController.delegate;
if ([extendedDelegate respondsToSelector:@selector(actionTaken)])
{
[extendedDelegate actionTaken];
}
}