在主 vc 中(在主 Storyboard中,我有导航 Controller 和 View Controller )在加载所有设置(从服务器)后,我呈现新的 vc
DispatchQueue.main.async {
var stor: UIStoryboard!
stor = UIStoryboard(name: "Profile", bundle: nil)
let viewcontroller = stor.instantiateViewController(withIdentifier: "profileVC")
let nav = UINavigationController(rootViewController: viewcontroller)
self.present(nav, animated: true, completion: nil)
}
在profileVC
中
navigationController?.interactivePopGestureRecognizer!.delegate = self // enable swipe to back
// present new vc
var stor: UIStoryboard!
stor = UIStoryboard(name: "Settings", bundle: nil)
let viewcontroller = stor.instantiateViewController(withIdentifier: "settingsVC")
self.navigationController?.pushViewController(viewcontroller, animated: true)
但有时我会黑屏 image (在profileVC
中)和image (在从 profileVC
推送的另一个 vc 中)当滑动屏幕时
我该如何修复它?
最佳答案
我猜你已经清除了 super View 的颜色。仔细检查一下。当你清除 super View 的颜色时会发生这种情况。
关于滑动时快速黑屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56732352/