ptomasroos / react-native-tab-navigator

A tab bar that switches between scenes, written in JS for cross-platform support
MIT License
2.4k stars 415 forks source link

iPhone X Adaptation #159

Closed helloDolin closed 6 years ago

helloDolin commented 7 years ago

iPhone X,The tabBar height is 49 + 34

our code : tabBarHeight: 49

will update this?

habovh commented 6 years ago

Just made PR #166 to do just that. Even better, it does not include any hardcoded value and uses iOS 11 Safe Area concept.

In case you need to use it before the PR gets merged, here's the fork: habovh/react-native-tab-navigator.

Mad-hu commented 6 years ago

165

qq 20171121094134 qq 20171121094139

habovh commented 6 years ago

@Mad-hu I consider this implementation bad practice, since this won't work with other aspect ratio/screen dimensions that Apple may come out with in the future. For example you can adjust the window size on iPad using the split screen, and you might want to have access to the actual safe area concept that Apple provided along with iOS 11. This is way more flexible and scalable.

jsfu commented 6 years ago

use tabBarStyle={{paddingBottom:xx, height:xx}}

ptomasroos commented 6 years ago

Will close since this issue is more than a year, feel free to a open a new if this is still a issue.