Beispiel #1
0
        public static NSInvocation ToInvocation(this NSMethodSignature signature)
        {
            var cls  = Class.GetHandle(typeof(NSInvocation));
            var ctor = Selector.GetHandle("invocationWithMethodSignature:");
            var inv  = LibObjc.IntPtr_objc_msgSend_IntPtr(cls, ctor, signature.Handle);

            return(ObjCRuntime.Runtime.GetNSObject <NSInvocation>(inv));
        }
Beispiel #2
0
        public static NSMethodSignature GetMethodSignature(this NSObject obj, Selector selector)
        {
            var sig = LibObjc.IntPtr_objc_msgSend_IntPtr(obj.Handle, Selector.GetHandle("methodSignatureForSelector:"), selector.Handle);

            return(ObjCRuntime.Runtime.GetNSObject <NSMethodSignature>(sig));
        }