对于在UIView上,是不能跳转的,所以我们通常要借助UIViewController,但经常会出现UIViewController没被加载的情况。这时就会报这个错。

解决方法:

 viewCon = (UIApplication.shared.keyWindow?.rootViewController)!
  self.viewCon.present(alertView, animated: true, completion: nil);

希望后面的童鞋不要掉坑里了哦!!!!

如果对你有帮助,请关注我哦!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-12-17
  • 2022-03-05
  • 2021-08-21
  • 2022-01-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2021-11-02
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
相关资源
相似解决方案