Tencent / QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案
http://qmuiteam.com/ios
Other
7.08k stars 1.38k forks source link

[UIKit Bug] iOS 12 及以上的系统,如果设置了自己的 leftBarButtonItem,且 title 很长时,则当 pop 的时候,title 会瞬间跳到左边,与 leftBarButtonItem 重叠 #1217

Closed MoLice closed 3 years ago

MoLice commented 3 years ago

Bug 表现 iOS 12 及以上,当设置了 leftBarButtonItem 且界面标题很长时,pop 的瞬间标题会跳到左边,与 leftBarButtonItem 重叠,如以下录屏所示:

截图

如何重现

  1. self.navigationItem.leftBarButtonItem = xxx; // 如果没有 leftBarButtonItem,只有默认的返回按钮,则没问题
  2. self.title = xxx;// 文字足够长,或者如果是自定义的 titleView,则 titleView 足够宽
  3. 执行 pop 操作,为了便于观察,一般用手势返回

以下是测试 Demo: TestNavigationTitleView.zip

其他信息

MoLice commented 3 years ago

已发布 4.2.3 修复该问题。