来自 iOS 人机界面指南,iOS UI Element Usage Guidelines
On iPhone, take into account the automatic change in toolbar height that occurs on device rotation. In particular, make sure your custom toolbar icons fit well in the thinner bar that appears in landscape orientation. Don’t specify the height of a toolbar programmatically.
例如,我可以在 Mail、iPhone 版 Twitter 和 Dropbox 中看到高度从 44 点变为 32 点,但是当我添加工具栏(使用 Interface Builder)并让我的 UIViewController 子类自动旋转(shouldAutorotateToInterfaceOrientation:
返回 YES),工具栏不会在设备旋转时自动更改其高度。
UIToolbar Class Reference没有提到高度的自动更改,所以即使 HIG 说不要以编程方式指定工具栏的高度,我是否应该以编程方式更改它?
最佳答案
您是否检查了工具栏的自动调整大小属性?
关于iphone - 设备旋转时的 UIToolbar 高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5219833/