I need to construct an arbitrary NSMethodSignature with "signatureWithObjCTypes:" in Cocoa without having an object that I can ask for a signature with "methodSignatureForSelector:".
For this, I need the method encoding, which e.g. is
c12@0:4@8
for
(BOOL) isEqual: (id) object
I tried @encode(...) to obtain a type encoding, but this does not seem to work for functions (it results in an unknown type '?'). I dont't want to manually encode the function type, since this is not portable across different runtimes.
There also is no declared method to obtain the encoding from.
Is there another way of obtaining the encoding?
Regards,
Jochen