This commit is contained in:
Stuart Lang 2018-10-12 20:50:37 +01:00 коммит произвёл Rui Marinho
Родитель 1c48b4e52b
Коммит 1c0a9dff7a
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -7,12 +7,12 @@ namespace Xamarin.Forms.Platform.MacOS
internal static class NSViewControllerExtensions
{
public static Task<T> HandleAsyncAnimation<T>(this NSViewController container, NSViewController fromViewController,
NSViewController toViewController, NSViewControllerTransitionOptions transitonOption,
NSViewController toViewController, NSViewControllerTransitionOptions transitionOption,
Action animationFinishedCallback, T result)
{
var tcs = new TaskCompletionSource<T>();
container.TransitionFromViewController(fromViewController, toViewController, transitonOption, () =>
container.TransitionFromViewController(fromViewController, toViewController, transitionOption, () =>
{
tcs.SetResult(result);
animationFinishedCallback?.Invoke();
@ -21,4 +21,4 @@ namespace Xamarin.Forms.Platform.MacOS
return tcs.Task;
}
}
}
}