Objective-C Modifying Class Instance Superclass
I was wondering if there was a way of dynamically taking an Instance of a
class, so lets say I have a UIViewController called menu.
I could take menu's superclass which in this case would be
UIViewController and create a subclass of it. I would then assign this new
subclass to menu, I could also then dynamically override the methods as
well.
So that when Menu calls a method such as "ButtonClicked:" my code in the
new Class I created fires followed by the original code :).
This all has to be done at runtime for security reasons.
No comments:
Post a Comment