gpt4 book ai didi

ios - React Native 自定义 TabBarIOS 样式

转载 作者:行者123 更新时间:2023-11-29 11:59:46 25 4
gpt4 key购买 nike

我正在我的应用程序中使用 TabBarIOS 和 tabBarIOS.Item 实现一个 View 。到目前为止一切正常,但似乎没有太多的灵 active 来定制它。例如,我想让标签栏变高,或者让图标变低以占据标题空间,因为现在它们正漂浮在标签栏的顶部。

您可以看到图标离顶部更近了。我正在尝试调整它,使它们更垂直地位于中心。

enter image description here

我尝试做类似的事情 -

<TabBarIOS>
<TabBarIOS.Item style={{paddingTop: 30}}> other content here </TabBarIOS.Item>
<TabBarIOS.Item style={{paddingTop: 30}}> other content here </TabBarIOS.Item>
</TabBarIOS>

但填充调整没有反射(reflect)出来。我也尝试调整高度、边距和其他东西,但样式似乎根本没有反射(reflect)出来。我在这里错过了什么吗?这完全可以做到吗?

提前致谢!

最佳答案

<TabBarIOS>
<TabBarIOS.Item title=''> content here </TabBarIOS.Item>
</TabBarIOS>

将标题保留为空字符串将使标签栏图标居中。

关于ios - React Native 自定义 TabBarIOS 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37472977/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com