滑动时快速黑屏

标签 swift

在主 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/

相关文章:

SwiftUI 和 Combine,如何创建可重用的发布者来检查字符串是否为空

ios - 从 Swift 函数中的异步调用返回数据

ios - 在新 Apple Watch Series 2 WatchOS 3 中使用 GPS

swift - Swift 5 中开关盒 "@unknown default"和 "default"之间的区别

ios - UIScrollView 不会缩放。 ( swift )

ios - 将控制命令发送到 UIWebView 以进行在线游戏 - Swift

json - 如何从可选的 AnyObjects 创建 SwiftyJSON 字典?

ios - 超时请求后如何返回上一屏幕?

swift : How to instantiate a new view controller with separate delegate

ios - Swift NumberFormatter 只适用于千