Exemple #1
0
        public void BeginInvokeOnMainThread(NSAction action)
        {
            var d = new NSAsyncActionDispatcher(action);

#if MONOMAC
            Messaging.void_objc_msgSend_IntPtr_IntPtr_bool(d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDoneHandle,
                                                           NSActionDispatcher.Selector.Handle, d.Handle, false);
#else
            Messaging.void_objc_msgSend_IntPtr_IntPtr_bool(d.Handle, Selector.GetHandle(Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone),
                                                           Selector.GetHandle(NSActionDispatcher.SelectorName), d.Handle, false);
#endif
        }
Exemple #2
0
        public virtual void Invoke(NSAction action, TimeSpan delay)
        {
            var d = new NSAsyncActionDispatcher(action);

            d.PerformSelector(NSActionDispatcher.Selector, null, delay.TotalSeconds);
        }
Exemple #3
0
        public virtual void Invoke(NSAction action, double delay)
        {
            var d = new NSAsyncActionDispatcher(action);

            d.PerformSelector(NSActionDispatcher.Selector, null, delay);
        }