UIKitThreadAccessException UIKitThreadAccessException Class


Exception thrown when a UIKit API is invoked from a background thread.

public class UIKitThreadAccessException : Exception
type UIKitThreadAccessException = class
    inherit Exception


The exception is thrown if some background code has called into a UIKit API that is not thread safe. In general, most UIKit APIs are not thread safe and should not be invoked from a background thread. If you must invoke a UIKit method from a background thread, you should consider queueing a task using the M:Foundation.NSObject.BeginInvokeOnMainThread(Foundation.NSAction) method.

It is possible to disable the runtime check by setting the CheckForIllegalCrossThreadCalls field to false.

This exception is thrown by MonoTouch.dll in debug builds, or in release builds that have been compiled with the --force-thread-check flag.


UIKitThreadAccessException() UIKitThreadAccessException()

Applies to