Comments (22)
<ScrollView
contentInsetAdjustmentBehavior="never"
automaticallyAdjustContentInsets={false}
contentInset={{ top: 0, left: 0, bottom: 0, right: 0 }}
>
//...
</ScrollView>
from hybrid-navigation.
是不是调用 this.props.garden.setTabBarColor({tabBarColor: '#ffffff'}) 才会出现?你说的是 iOS?
from hybrid-navigation.
还是会有白色的块,不停闪动,白色的块高度与tabbar一致
from hybrid-navigation.
tabBar 的颜色是不是透明的?
from hybrid-navigation.
playground 这个项目也有用 scrollview, 没发现你说的那种情况呢
是否可以参考下 playground 的做法?
from hybrid-navigation.
就在上面,一直显示着
this.props.garden.setTabBarColor({tabBarColor: '#ffffff'})
from hybrid-navigation.
必须先push一个页面再返回才会有
from hybrid-navigation.
嗯 是要先调用setTabBarColor然后push一个页面再返回才会出现, 是iOS
from hybrid-navigation.
我无法复现这个问题,你可以写个项目来复现这个问题么?
from hybrid-navigation.
嗯 好的,我猜测跟设置显示状态栏有关,在返回的时候有执行显示状态栏。在Android设备上面没有这个问题。
from hybrid-navigation.
还有我发现另外一个问题,在android设备下执行 setTabBarColor 方法,tab的选择状态会跑到第一个
from hybrid-navigation.
https://github.com/listenzz/react-native-navigation-hybrid/blob/master/ios/NavigationHybrid/React/HBDGardenModule.m#L135
这行代码注释了就好了。。。
from hybrid-navigation.
这行代码是 setTabBarColor 的核心代码呀。
之前有通过 Garden.setStyle 设置过 tabBarColor 吗?
from hybrid-navigation.
我只是在调试。
from hybrid-navigation.
是 tabBar 的 translucent 发生变化所致
from hybrid-navigation.
后面加一段就好了 [tabBarVC.tabBar setTranslucent:true]
from hybrid-navigation.
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.
translucent 的值是受 tabBarColor 的值影响,一开始通过 Garden.setStyle 设置一个不透明的 tabBarColor, 后续通过 garden.setTabBarColor 再设置不透明的背景颜色,应该没问题了
from hybrid-navigation.
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.
另外发现。 如果在push出来的页面里面�
this.props.navigation.pop(false)
关闭动画也不会有问题。
但是如果用手势关闭那个问题有出现了。
�
from hybrid-navigation.
已经定位到问题。 应该跟这个库没关系
from hybrid-navigation.
我们换搞换主题也出现了相同的问题.
最后定位是因为调试模式下YellowBox 内部使用了ScrollView 没有加上
contentInsetAdjustmentBehavior="never"
automaticallyAdjustContentInsets={false}
contentInset={{ top: 0, left: 0, bottom: 0, right: 0 }}
引起的
from hybrid-navigation.
Related Issues (20)
- HBDTabBarController.m:183:21: No visible @interface for 'UITabBar' declares the selector 'scrollEdgeAppearance' HOT 19
- iOS全局设置barButtonItemTextSize,字体大小修改无效 HOT 1
- android 监听 BackHandler 虚拟键返回无效 HOT 3
- 使用了 react-native-vector-icons 中的icon HOT 2
- Dynamic Styles HOT 12
- Navigator.setInterceptor((action, from, to, extras), to字段返回undefined HOT 2
- 请问如何改变 showModal 默认的背景透明度? HOT 4
- npm install后在ios文件夹中未发现podfile。 HOT 1
- Reload后会初始化两次Stack的screen HOT 3
- [Android] 隐藏TopBar并设置titleItem会导致crash
- ReactRegistry.registerComponent可以懒注册吗 HOT 2
- 能否增加一个已有的原生项目相关的例子。 HOT 4
- 建议允许显示多个modal并可关闭指定Modal HOT 7
- navigationBarHiddenAndroid 参数在打开Modal时会发生抖动 HOT 10
- 建议: 能不能出个Demo 能用的? 按照教程来搞完全报错 HOT 4
- 大佬有联系方式吗
- 教程中android配置去掉ReactActivity怎么跑起来的? HOT 1
- app启动闪退 HOT 7
- navigationBarHiddenAndroid 在Android 7上不生效 HOT 1
- react-native-safe-area-context问题 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hybrid-navigation.