Upravit

Sdílet prostřednictvím


UIApplication.EnsureUIThread Method

Definition

Assertion to ensure that this call is being done from the UIKit thread.

public static void EnsureUIThread ();
static member EnsureUIThread : unit -> unit

Remarks

This method is used internally by MonoTouch to ensure that accesses done to UIKit classes and methods are only performed from the UIKit thread. This is necessary because the UIKit API is not thread-safe and accessing it from multiple threads will corrupt the application state and will likely lead to a crash that is hard to identify.

MonoTouch only performs the thread checks in debug builds. Release builds have this feature disabled.

Applies to