-
Notifications
You must be signed in to change notification settings - Fork 585
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
iPad OS18下需要适配,急盼 #292
Comments
+1 |
同样碰到问题了,有大神适配下吗? |
+1 |
iOS 18 ipad的层级改变了
if UIDevice.current.userInterfaceIdiom == .pad {
if #available(iOS 18.0, *) {
traitOverrides.horizontalSizeClass = .compact
view.addSubview(tabBar)
}
} 涉及旋转的话,使用autolayout布局 |
完美!但是跳转页面的话未隐藏 |
我的结构是Nav+tab,目前没有这个问题,你的应该是tab+nav,我不太确定具体什么情况,如果没有隐藏的话,我感觉可以考虑一下在nav或tab中写一些监听的代码,来监听状态手动实现类似系统的隐藏 |
我是tab套nav,也是tabbar在顶部导航栏了,求适配 |
我测试了一下,发现是系统多出来的一个层级没有隐藏 if UIDevice.current.userInterfaceIdiom == .pad {
if #available(iOS 18.0, *) {
traitOverrides.horizontalSizeClass = .compact
if let classType = NSClassFromString("_UITabContainerView"), let view = view.subviews.first(where: { $0.isKind(of: classType) }) {
view.isHidden = true
}
view.addSubview(tabBar)
}
} 这样把他隐藏掉就可以了,但是只测试push的情况,隐藏会不会引起其他的情况目前未知 |
_UITabContainerView涉及私有api吧 审核和后续迭代可能会受到影响 |
原来还需要加 |
在iPad OS18下外观会发生大变化,同时点击后hidesBottomBarWhenPushed也没有作用了,希望能早日更新,不胜感谢
The text was updated successfully, but these errors were encountered: