ios - 横向模式下的 TabBar 图像大小

标签 ios swift storyboard uitabbaritem landscape-portrait

我正在开发同时支持纵向和横向 模式的应用程序。我在 Storyboard 中使用默认的 TabBarController。

NOTE: I am adding custom offset on images

In Portrait mode the image size of tabbarItems are looking well nice. But when i am rotating my device to landscape mode, the TabbarItems images are looking too small

我该如何解决这个问题,以便我可以在横向模式下拥有更大的尺寸。

以下是纵向和横向模式的屏幕截图。

Portrait Landscape

对于横向模式下的标签栏有什么更好的方法吗?

谢谢!

#编辑 1 我为横向模式添加了自定义偏移量(均为负值)并且尺寸增加了。但是点击尺寸会增加(每次点击)

#编辑 2 我从横向模式中删除了左右插图,增加的图像尺寸是固定的,但尺寸再次减小。

对发生的事情有什么建议吗?

最佳答案

我刚遇到这个,你还需要设置 tabbarItem 的 landscapeImagePhoneInsets 属性。

关于ios - 横向模式下的 TabBar 图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47330770/

相关文章:

ios - 如何使用关系检索数据(Backendless)

iphone - iOS 7 makeKeyAndVisible 不工作

SwiftUI :Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, 子代码=0x0)

swift - 创建 json swift 应用程序 : fatal error: found nil when unwrapping json

ios - 具有多个类的 Storyboard UIViewController

ios - 如何在 UICollectionView 上添加 UIView 并使用单元格滚动?

ios - 在 Retina 显示器上带有 drawRect/更新图像性能问题的 UIView

swift - 如何让 NSNumber 接受可选项

ios - 如何使用 Storyboard更改标签栏选择的图像

ios - 在 Storyboard上制作一个屏幕,其中 View 在按钮单击时相互替换?