iphone - 设备旋转时的 UIToolbar 高度

标签 iphone ios uitoolbar

来自 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.

例如,我可以在 MailiPhone 版 TwitterDropbox 中看到高度从 44 点变为 32 点,但是当我添加工具栏(使用 Interface Builder)并让我的 UIViewController 子类自动旋转(shouldAutorotateToInterfaceOrientation: 返回 YES),工具栏不会在设备旋转时自动更改其高度。

UIToolbar Class Reference没有提到高度的自动更改,所以即使 HIG 说不要以编程方式指定工具栏的高度,我是否应该以编程方式更改它?

最佳答案

您是否检查了工具栏的自动调整大小属性?

关于iphone - 设备旋转时的 UIToolbar 高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5219833/

相关文章:

ios - swift ios 以编程方式设置 PageViewController 的过渡样式和方向

ios - NSInvalidArgumentException 使用 UISegmentedControl

iOS B2B程序: can you "buy" the app with the same business you developed from?

iphone - 工具栏按钮图标(页面网址)未加载

iOS 7 UIToolBar 覆盖状态栏

iphone - 默认情况下,UITableView编辑模式

iphone - 核心数据关系的自定义 setter 强制反向、互惠关系

ios - UIManagedDocument vs NSManagedObject : Performance

ios - AFNetworking 设置没有扩展名的图片

ios - 在 UIToolBar 上居中一个按钮