Giter Club home page Giter Club logo

Comments (22)

listenzz avatar listenzz commented on June 1, 2024 1
<ScrollView
        contentInsetAdjustmentBehavior="never"
        automaticallyAdjustContentInsets={false}
        contentInset={{ top: 0, left: 0, bottom: 0, right: 0 }}
      >
 //...
</ScrollView>

from hybrid-navigation.

listenzz avatar listenzz commented on June 1, 2024 1

是不是调用 this.props.garden.setTabBarColor({tabBarColor: '#ffffff'}) 才会出现?你说的是 iOS?

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

还是会有白色的块,不停闪动,白色的块高度与tabbar一致

from hybrid-navigation.

listenzz avatar listenzz commented on June 1, 2024

tabBar 的颜色是不是透明的?

from hybrid-navigation.

listenzz avatar listenzz commented on June 1, 2024

playground 这个项目也有用 scrollview, 没发现你说的那种情况呢

是否可以参考下 playground 的做法?

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

就在上面,一直显示着
this.props.garden.setTabBarColor({tabBarColor: '#ffffff'})

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

必须先push一个页面再返回才会有

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

嗯 是要先调用setTabBarColor然后push一个页面再返回才会出现, 是iOS

from hybrid-navigation.

listenzz avatar listenzz commented on June 1, 2024

我无法复现这个问题,你可以写个项目来复现这个问题么?

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

嗯 好的,我猜测跟设置显示状态栏有关,在返回的时候有执行显示状态栏。在Android设备上面没有这个问题。

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

还有我发现另外一个问题,在android设备下执行 setTabBarColor 方法,tab的选择状态会跑到第一个

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

https://github.com/listenzz/react-native-navigation-hybrid/blob/master/ios/NavigationHybrid/React/HBDGardenModule.m#L135
这行代码注释了就好了。。。

from hybrid-navigation.

listenzz avatar listenzz commented on June 1, 2024

这行代码是 setTabBarColor 的核心代码呀。
之前有通过 Garden.setStyle 设置过 tabBarColor 吗?

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

我只是在调试。

from hybrid-navigation.

listenzz avatar listenzz commented on June 1, 2024

是 tabBar 的 translucent 发生变化所致

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

后面加一段就好了 [tabBarVC.tabBar setTranslucent:true]

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

https://github.com/listenzz/react-native-navigation-hybrid/blob/master/ios/NavigationHybrid/React/HBDGardenModule.m#L135
后面加
[tabBarVC.tabBar setTranslucent:true] 可以好
这么加也不行
[tabBarVC.tabBar setTranslucent:false]
鉴于translucent 没有在任何地方有设置,是不是可以直接在这里写死成true
好像不指定ios会根据颜色来自动变化。
大哥,你太犀利了,一眼看出来问题。 我调好几天了。。

from hybrid-navigation.

listenzz avatar listenzz commented on June 1, 2024

translucent 的值是受 tabBarColor 的值影响,一开始通过 Garden.setStyle 设置一个不透明的 tabBarColor, 后续通过 garden.setTabBarColor 再设置不透明的背景颜色,应该没问题了

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

translucent 为yes的场景是可以。 但是那个透明度太低了。 不满足需求。

translucent 的值是受 tabBarColor 的值影响,一开始通过 Garden.setStyle 设置一个不透明的 tabBarColor, 后续通过 garden.setTabBarColor 再设置不透明的背景颜色,应该没问题了

按上面的设置还是不行。

然后我怀疑是不是我加的代码 translucent 没有自动设置好。 我直接在代码里面写死translucent=NO
HBDTabBarController.m

viewDidLoad
self.tabBar.translucent= NO;

还是会有个白的。 那个白的应该刚好是tabbar的高度。然后我设置下面的配置。
hideTabBarWhenPush:false

在push 。然后pop 之后,�发现那个白块没有了。 还没发现问题出在哪里,我在继续看看。
不行的话我在弄个demo出来重现bug

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

另外发现。 如果在push出来的页面里面�

this.props.navigation.pop(false)

关闭动画也不会有问题。
但是如果用手势关闭那个问题有出现了。

from hybrid-navigation.

NrqhEIcsRi004 avatar NrqhEIcsRi004 commented on June 1, 2024

已经定位到问题。 应该跟这个库没关系

from hybrid-navigation.

treemore avatar treemore commented on June 1, 2024

我们换搞换主题也出现了相同的问题.
最后定位是因为调试模式下YellowBox 内部使用了ScrollView 没有加上
contentInsetAdjustmentBehavior="never"
automaticallyAdjustContentInsets={false}
contentInset={{ top: 0, left: 0, bottom: 0, right: 0 }}
引起的

from hybrid-navigation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.