Class IosUtils
Provides the running of work on the UI (main) thread: the iOS counterpart of AndroidUtils.
public static class IosUtils
- Inheritance
-
IosUtils
- Inherited Members
Methods
RunOnUiThread(Action)
Runs an action on the UI thread: at once where the caller is on it, or else queued there.
public static Task RunOnUiThread(Action action)
Parameters
actionActionThe action.
Returns
- Task
A task that completes when the action has run, or fails with its exception.
Remarks
Where the action is queued, its task completes with continuations run asynchronously, not inline on the UI thread; where it runs at once, the task is already complete.
RunOnUiThread<T>(Func<T>)
Runs a function on the UI thread: at once where the caller is on it, or else queued there.
public static Task<T> RunOnUiThread<T>(Func<T> action)
Parameters
actionFunc<T>The function.
Returns
- Task<T>
A task whose result is the function's, or that fails with its exception.
Type Parameters
TThe type of the function's result.
Remarks
Where the function is queued, its task completes with continuations run asynchronously, not inline on the UI thread; where it runs at once, the task is already complete.