MZFormSheetPresentationController provides an alternative to the native iOS UIModalPresentationFormSheet, adding support for iPhone and additional opportunities to setup UIPresentationController size and feel form sheet.
MIT License
974
stars
145
forks
source link
Set backgroundVisibilityPercentage does not reflect to dimmingView #142
Here is my code:
MZFormSheetPresentationViewController *formSheetController = [[MZFormSheetPresentationViewController alloc] initWithContentViewController:myVC]; formSheetController.presentationController.contentViewSize = CGSizeMake(300, 180); formSheetController.presentationController.backgroundColor = [UIColor greenColor]; formSheetController.presentationController.backgroundVisibilityPercentage = 0.3; formSheetController.presentationController.shouldApplyBackgroundBlurEffect = NO;
After I set a breakpoint in MZFormSheetPresentationViewController.m,
[self.presentedViewController.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) { [UIView animateWithDuration:[context transitionDuration] animations:^{ if (shouldTransitionBlur) { self.blurBackgroundView.effect = self.blurEffectAdapter.blurEffect; } else { self.dimmingView.alpha = 1.0; } }]; } completion:nil];
The issue may be due to self.dimmingView.alpha = 1.0;
Here is my code:
MZFormSheetPresentationViewController *formSheetController = [[MZFormSheetPresentationViewController alloc] initWithContentViewController:myVC]; formSheetController.presentationController.contentViewSize = CGSizeMake(300, 180); formSheetController.presentationController.backgroundColor = [UIColor greenColor]; formSheetController.presentationController.backgroundVisibilityPercentage = 0.3; formSheetController.presentationController.shouldApplyBackgroundBlurEffect = NO;
After I set a breakpoint in MZFormSheetPresentationViewController.m,
[self.presentedViewController.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) { [UIView animateWithDuration:[context transitionDuration] animations:^{ if (shouldTransitionBlur) { self.blurBackgroundView.effect = self.blurEffectAdapter.blurEffect; } else { self.dimmingView.alpha = 1.0; } }]; } completion:nil];
The issue may be due toself.dimmingView.alpha = 1.0;