Objective-C keeps all its methods in a huge hashtable – so shouldn’t it possible to patch this table and replace an existing method with my own patched method (which then calls the original)?
I need a way to hook up the NSWindow KeyUp method in a window which i can’t subclass cause it’s already created.
I need some code or at least some keywords i can use for further searching.
Of course it is possible. In fact, you don’t even need to look into the hash table — there’s standard API for this.
For example: