Tencent / QMUI_iOS

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

[iOS 13] UITabBarItem (QMUI) qmui_imageViewInTabBarButton: can not find the right UIImageView #616

Closed MoLice closed 5 years ago

MoLice commented 5 years ago

It causes UIBarItem (QMUIBadge)'s layout error.

The reason is that when the UITabBar is blurred(means it has no background image), the UIImageView will be added to an UIVisualEffectView, and before iOS 13, the UIImageView is added to the UITabBarButton directly.

image

ziecho commented 5 years ago

iOS 13 beta5 有变化,表现为: 如果用 iOS 12 SDK 编译: image TabBarButton 内部有一个磨砂 UIVisualEffectView,但是他只用来包裹 label 也就是 tabbar item 的标题,并没有包裹 image(在 iOS 13 beta1 ~ beta4 他包裹了imageView、label) 如果用 iOS 13 SDK 编译: image TabBarButton 内部没有 UIVisualEffectView,全部的 view 都在 TabBarButton 的 subview

ziecho commented 5 years ago

经测试 iOS 13.1 又出现了新的变化,即使使用 iOS 13 SDK 编译,UIVisualEffectView 内部仍然可能会包裹 imageView