Mar*_*hex 5 uinavigationcontroller ios swift
我需要将 UIParallaxDimmingView 设为白色或透明。
vc1 的白色背景受到此 UIParallaxDimmingView 的影响,使其在动画结束后过渡到 vc2 时变成浅灰色,vc2 获得其白色背景。
我进行了一项研究,发现了这段代码,但对我不起作用。
func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) {
if (navigationController.viewControllers.count > 1)
{
self.navigationController?.interactivePopGestureRecognizer?.delegate = self
navigationController.interactivePopGestureRecognizer?.isEnabled = true;
}
else
{
self.navigationController?.interactivePopGestureRecognizer?.delegate = nil
navigationController.interactivePopGestureRecognizer?.isEnabled = false;
}
}
Run Code Online (Sandbox Code Playgroud)
神秘的_UIParallaxDimmingView。它是什么?
iOS 应用程序在 PushViewController 上冻结
更新 这是最初的问题如何在弹出的 UIViewController 中删除 UIParallaxDimmingView?
小智 0
雨燕5
例如,在推送 viewController 时,只需使用 false 删除动画即可。十分简单。
navigationController?.pushViewController(YourController, 动画: false)
| 归档时间: |
|
| 查看次数: |
1259 次 |
| 最近记录: |