Upravit

Sdílet prostřednictvím


UIApplication.CheckForIllegalCrossThreadCalls Field

Definition

Determines whether the debug builds of MonoTouch will enforce that calls done to UIKit are only issued from the UI thread.

public static bool CheckForIllegalCrossThreadCalls;
 staticval mutable CheckForIllegalCrossThreadCalls : bool

Field Value

Remarks

On debug builds, MonoTouch will enforce that calls made to UIKit APIs are only done from the UIKit thread. This is useful to spot code that could inadvertently use UIKit from a non-UI thread which can corrupt the UIKit state and could lead to very hard to debug problems.

But sometimes it might be useful to disable this check, either because you can ensure that UIKit is not in use at this point or because MonoTouch might be enforcing the checks in APIs that might have later been relaxed or made thread safe by iOS.

Applies to