Upravit

Sdílet prostřednictvím


UIViewController.TransitionAsync Method

Definition

Used for transitioning between two view controller'€™s child view controllers.

public virtual System.Threading.Tasks.Task<bool> TransitionAsync (UIKit.UIViewController fromViewController, UIKit.UIViewController toViewController, double duration, UIKit.UIViewAnimationOptions options, Action animations);
abstract member TransitionAsync : UIKit.UIViewController * UIKit.UIViewController * double * UIKit.UIViewAnimationOptions * Action -> System.Threading.Tasks.Task<bool>
override this.TransitionAsync : UIKit.UIViewController * UIKit.UIViewController * double * UIKit.UIViewAnimationOptions * Action -> System.Threading.Tasks.Task<bool>

Parameters

fromViewController
UIViewController

The view controller that initiates the action and which is currently visible in the parent hierarchy.

toViewController
UIViewController

The target view controller (not currently visible).

duration
Double

Total duration of the animations, measured in seconds.

options
UIViewAnimationOptions

A mask of options that determines how you want the animations performed.

animations
Action

An action object containing the changes that the application developer wants to commit to the views. Here is where developers can modify any animatable properties of the views.

Returns

A task that represents the asynchronous Transition operation. The value of the TResult parameter is a UIKit.UICompletionHandler.

Remarks

The TransitionAsync method is suitable to be used with C# async by returning control to the caller with a Task representing the operation.

To be added.

Applies to