public void BeginInvokeOnMainThread(Action 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 }
public virtual void Invoke(Action action, TimeSpan delay) { var d = new NSAsyncActionDispatcher(action); d.PerformSelector(NSActionDispatcher.Selector, null, delay.TotalSeconds); }
public virtual void Invoke(Action action, double delay) { var d = new NSAsyncActionDispatcher(action); d.PerformSelector(NSActionDispatcher.Selector, null, delay); }