We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
模拟器
iOS 11.3
9.3
2.6.2
从界面 A push 进界面 B,而界面 B 使用了自定义返回按钮。 此时如果再去改界面 A 的 leftBarButtonItem,会看到界面 B 的返回按钮往右边跳动。
The text was updated successfully, but these errors were encountered:
相关代码在 UIBarButtonItem (QMUINavigationButton_Private) 里。
UIBarButtonItem (QMUINavigationButton_Private)
后来再改界面 A 的 leftBarButtonItem 时,会导致重新对 navigationBar.qmui_customizingBackBarButtonItem 进行赋值,而如果这个属性前后的值不同,就会导致 navigationBar 的 contentView 的 layoutMargins 变化,表现出来就是返回按钮跳动。
leftBarButtonItem
navigationBar.qmui_customizingBackBarButtonItem
navigationBar
contentView
layoutMargins
在 setLeftBarButtonItem 时应该对当前的 navigationItem 是否是 topItem 进行判断,如果修改的是非可视的 item,则不操作 navigationBar 布局相关的东西。
setLeftBarButtonItem
navigationItem
topItem
Sorry, something went wrong.
2.7.0 版本已发布,修复了这个问题。
No branches or pull requests
请填写运行环境
模拟器
iOS 11.3
9.3
2.6.2
请描述具体问题
从界面 A push 进界面 B,而界面 B 使用了自定义返回按钮。
此时如果再去改界面 A 的 leftBarButtonItem,会看到界面 B 的返回按钮往右边跳动。
The text was updated successfully, but these errors were encountered: