Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

错误信息“We shouldn't be decreasing the API version... right?” #1469

Closed
nameIsYong opened this issue Dec 15, 2022 · 1 comment
Closed

Comments

@nameIsYong
Copy link

nameIsYong commented Dec 15, 2022

Bug 表现
问题的具体描述

Demo里面单独使用框架 CocoaDebug 没有任何问题,但导入QMUIKit 后,QMUIKit代码里面崩溃。
代码如下
let vc = UIStoryboard(name: "Logs", bundle: Bundle(for: CocoaDebug.self)).instantiateViewController(withIdentifier: "Logs")
self.present(vc, animated: true)

截图
Bug 现场的界面截图,或者 Xcode 控制台的错误信息截图,有问题的代码截图

截图
https://github.com/nameIsYong/QMUIKit_About/blob/main/WechatIMG452.png

Demo
https://github.com/nameIsYong/QMUIKit_About

如何重现
调用代码
let vc = UIStoryboard(name: "Logs", bundle: Bundle(for: CocoaDebug.self)).instantiateViewController(withIdentifier: "Logs")
self.present(vc, animated: true)

预期的表现
正常情况下,应该是不在QMUIKit框架的代码里崩溃。

其他信息

  • 设备: [模拟器iPhone14]
  • iOS 版本: [iOS 16.1]
  • Xcode 版本: [Xcode 14.1]
  • QMUI 版本: [4.6.1]
@MoLice
Copy link
Collaborator

MoLice commented Dec 19, 2022

你的 Demo 是 iOS 16 的,QMUI 在 iOS 15 及以后使用系统的 UINavigationBarAppearance 来设置 UINavigationBar 的样式。而你引入的 CocoaDebug 框架自带的这几个 storyboard 里的 UINavigationBar 没有使用 UINavigationBarAppearance,所以产生了冲突。
image

简单的解决方法是逐个打开 storyboard,选中里面的 UINavigationBar,把右侧的 Standard 勾选上即可。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants