我需要将 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?
由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[UISearchBar searchTextField]:无法识别的选择器发送到实例 0x7f8ebaf60cf0”
我怎么知道这个视图 0x7f8ebaf60cf0 是哪个?
我在做 PO 0x7f8ebaf60cf0
它返回这个 140250998770928
然后我需要更多信息,如 recursiveDescription 但我无法进一步了解。我怎样才能开始调试这样的错误?
如何将地图从iOS 13更改为暗模式?
我已从 UserInterfaceStyle 中选择退出,因此系统范围的颜色不适用于我,所以我将手动进行。
我在8:19看过苹果WWDC2019 - Session 236 的这段视频,但那是快照,我没看懂。
实际上我正在尝试类似的事情:
private var mapView: MKMapView!
override func viewDidLoad() {
super.viewDidLoad()
mapView.backgroundColor = .black
}
Run Code Online (Sandbox Code Playgroud)
但它不会将主题或外观或 traitCollection 更改为深色。
有什么建议吗?