How to hide the delegate method implemented from another class based on the BOOL value? - objective c


I need to hide implemented method of my custom delegate in UIViewController class, depending on BOOL property "isHidden". I call one UIViewController from 2 places, and I need to hide delegate method from one of these classes. For example Class A and B call my UIViewController and check this method with respondsToSelector:@selector(myMethod), and if BOOL property is TRUE, so let respondsToSelector method return TRUE value, else - FALSE. Is this possible?

Let the delegate call these methods.. and depending on the bool value perform the task in them or just let it pass...