Foundation.NSObject.BeginInvokeOnMainThread Method
Invokes asynchrously the specified code on the main UI thread.

Syntax

public void BeginInvokeOnMainThread (ObjCRuntime.Selector sel, NSObject obj)

Parameters

sel
Selector to invoke
obj
Object in which the selector is invoked

Remarks

You use this method from a thread to invoke the code in the specified object that is exposed with the specified selector in the UI thread. This is required for most operations that affect UIKit or AppKit as neither one of those APIs is thread safe.

The code is executed when the main thread goes back to its main loop for processing events.

Unlike NSObject.InvokeOnMainThread(ObjCRuntime.Selector, NSObject) this method merely queues the invocation and returns immediately to the caller.

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0