Is it possible to check whether a subclass implements a method that exists either in its immediate superclass or in some superclass of its superclass, etc?
E.g. I subcla
Not the optimal solution but you can keep a boolean member to your UIView subclass (let's call it UIViewSub
indicating if the desired behavior is implemented by the class and check that boolean before using the method.
Your subclasses (those inheriting UIViewSub
) will set/unset this member accordingly in its construction (i.e if it does override it with implementation or not)