proxy - How can I forward class methods in Objective-C? -


in objective-c know can forward selectors 1 instance another:

- (id)forwardingtargetforselector:(sel)aselector; 

how can forward class methods class? resolveclassmethod: didn't seem appropriate, because don't want dynamically add methods class, forward calls.

edit: far best have create instance forwards selector class object, this:

- (id)forwardingtargetforselector:(sel)aselector {     return nsclassfromstring(@"theclass"); } 

its little uglier, because proxy object has accept instance methods, proxy has declare instance methods class methods proxying.

in objective-c class object object other , support forwarding in same way. looking is:

+ (id)forwardingtargetforselector:(sel)aselector 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -