public override void DismissalTransitionWillBegin() { base.DismissalTransitionWillBegin(); var coordinator = PresentingViewController.GetTransitionCoordinator(); coordinator.AnimateAlongsideTransition(_ => DimmedBackgroundView.Alpha = 0, null); }
public override void PresentationTransitionWillBegin() { dimmingView.Frame = ContainerView.Bounds; ContainerView.AddSubview(dimmingView); var transitionCoordinator = PresentingViewController.GetTransitionCoordinator(); transitionCoordinator.AnimateAlongsideTransition(context => dimmingView.Alpha = 0.8f, null); }
public override void PresentationTransitionWillBegin() { base.PresentationTransitionWillBegin(); ContainerView.AddSubview(DimmedBackgroundView); DimmedBackgroundView.Alpha = 0; var coordinator = PresentingViewController.GetTransitionCoordinator(); coordinator.AnimateAlongsideTransition(_ => DimmedBackgroundView.Alpha = DimmedBackgroundTranslucentAlpha, null); }
// before transition start public override void PresentationTransitionWillBegin() { if (!ContainerView.Subviews.Any()) { ContainerView.InsertSubview(_overlayView, 0); } PresentingViewController.GetTransitionCoordinator()?.AnimateAlongsideTransition( obj => _overlayView.Alpha = 1f, obj => { } ); }
public override void PresentationTransitionWillBegin() { UIView presentedViewControllerView = base.PresentedView; presentationWrapperView = new UIView(FrameOfPresentedViewInContainerView); presentationWrapperView.Layer.ShadowOpacity = .44f; presentationWrapperView.Layer.ShadowRadius = 13f; presentationWrapperView.Layer.ShadowOffset = new CGSize(0f, -6f); var presentationRoundedCornerView = new UIView(UIEdgeInsetsInsetRect(presentationWrapperView.Bounds, new UIEdgeInsets(0F, 0F, -cornerRadius, 0))); presentationRoundedCornerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; presentationRoundedCornerView.Layer.CornerRadius = cornerRadius; presentationRoundedCornerView.Layer.MasksToBounds = true; var presentedViewControllerWrapperView = new UIView(UIEdgeInsetsInsetRect(presentationRoundedCornerView.Bounds, new UIEdgeInsets(0F, 0F, cornerRadius, 0F))); presentedViewControllerWrapperView.AutoresizingMask = (UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight); presentedViewControllerView.AutoresizingMask = (UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight); presentedViewControllerView.Frame = presentedViewControllerWrapperView.Bounds; presentedViewControllerWrapperView.AddSubview(presentedViewControllerView); presentationRoundedCornerView.AddSubview(presentedViewControllerWrapperView); presentationWrapperView.AddSubview(presentationRoundedCornerView); var dimmingViewAux = new UIView(ContainerView.Frame) { BackgroundColor = UIColor.Black, Opaque = false, AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight }; dimmingView = dimmingViewAux; var tapGesture = new UITapGestureRecognizer(); tapGesture.AddTarget(() => DimmingViewTapped(tapGesture)); dimmingView.AddGestureRecognizer(tapGesture); ContainerView.AddSubview(dimmingView); var transitionCoordinator = PresentingViewController.GetTransitionCoordinator(); dimmingView.Alpha = 0f; transitionCoordinator.AnimateAlongsideTransition((obj) => dimmingView.Alpha = .5f, (obj) => {}); }
public override void DismissalTransitionWillBegin() { var transitionCoordinaotr = PresentingViewController.GetTransitionCoordinator(); transitionCoordinaotr.AnimateAlongsideTransition(context => dimmingView.Alpha = 0.0f, null); }
public override void DismissalTransitionWillBegin() { var transitionCoordinator = PresentingViewController.GetTransitionCoordinator(); transitionCoordinator.AnimateAlongsideTransition((obj) => dimmingView.Alpha = 0f, (obj) => { }); }
public override void DismissalTransitionWillBegin() { PresentingViewController.GetTransitionCoordinator()?.AnimateAlongsideTransition( obj => _overlayView.Alpha = 0f, null ); }