我有一个UIViewController
vc1这是在之后推送的UIViewController
vc2.
Both vc1 and vc2具有透明背景。
问题:
当我尝试弹出时vc2使用交互式弹出手势(从边缘平移),在我看来堆栈显得很神秘UIParallaxDimmingView
这使我的堆栈变暗(在透明视图控制器下有一个背景图像)。
一旦我松开手指、取消或完成转换,它就会再次变得清晰/透明。
我如何禁用/删除UIParallaxDimmingView
或者将其设置为透明?
如果当您尝试使用交互式弹出手势(从边缘平移)弹出 VC 时正在推送 VC(仍在动画),则应用程序可能会被冻结。这可以帮助您:
/ set gesture no when pushViewController /
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.interactivePopGestureRecognizer.enabled = NO;
}
[super pushViewController:viewController animated:animated];
}
/ set gesture yes when showViewController /
- (void)navigationController:(UINavigationController )navigationController didShowViewController:(UIViewController )viewController animated:(BOOL)animated
{
if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
navigationController.interactivePopGestureRecognizer.enabled = YES;
}
/ if rootViewController, set delegate nil /
if (navigationController.viewControllers.count == 1) {
navigationController.interactivePopGestureRecognizer.enabled = NO;
navigationController.interactivePopGestureRecognizer.delegate = nil;
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)