导航栏自动旋转
我有一个 navigationBar
在旋转设备时不再自动调整大小。因此,navigationBar 保持其纵向高度为 44 像素,并且不会缩小到 32 像素。我使用自定义 UITabBarController
子类来初始化 UINavigationController
并将它们添加到它的 viewControllers
数组中。由于我将 UIImageView
作为自定义背景添加到 navigationBar
(旋转时可以很好地更新),所以我总是在自定义视图下看到 12 像素的差异。此差异也与 UITableView
重叠了 12 个像素。所以一切似乎都工作正常 - 除了普通的 UINavigationBar 之外。有人遇到过这个问题并找到解决方案吗?
谢谢
–f
I've got a navigationBar
that does not auto-resize when rotating the device anymore. So the navigationBar keeps it's portrait height of 44 pixels and does not shrink down to 32 pixels. I'm using a custom UITabBarController
subclass which initializes the UINavigationController
s and adds them to it's viewControllers
array. Since I'm adding a UIImageView
as a custom background to the navigationBar
– which is being updated nicely when rotating – I always see the 12 pixel difference under my custom view. This differnce overlaps the UITableView
also by the 12 pixels. So everything seems to be working fine – except the ordinary UINavigationBar
. Did anyone ever have this issue and found a solution?
Thanks
–f
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,这个回答了我的问题问题并为我工作。但我仍然不确定这是否是“正确”的解决方案,因为模板会自动正确执行此操作。
Ok, this one answered my question and worked for me. But I'm still not sure if that's the 'right' solution since the templates do it right automatically.