3
私は反応ネイティブTabNavigatorを使用して、アプリケーションのタブ間を移動しています。TabNavigator:ターゲットプラットフォームに基づくスタイルタブのラベル
const TabNav = TabNavigator({
Home: {
screen: HomeScene,
navigationOptions:{
tabBar: {
label: 'Home',
icon: ({ focused }) => {
let imgSource = focused
? require('../common/img/selected-home-75.png')
: require('../common/img/unselected-home-75.png');
return <Image
source={imgSource}
style={tabBarStyles.icon}
/>
}
}
}
},
...
}, {
swipeEnabled: false,
tabBarOptions: {
showIcon: true,
upperCaseLabel: false,
labelStyle: tabBarStyles.labelStyle,
style: tabBarStyles.style
}
});
各タブには、アイコンとラベルが含まれています。私は、アプリケーションがiOS上で実行されているのかAndroid上で実行されているのかによって、TabBarのスタイルを少し違ったものにしたいと思います。 TabBarBottom 『と『私はトップにTabBarと下部TabBarのための別の構成を提供することが可能であると思わせるTabBarTop』『のための』tabBarOptions「tabNavigationConfigは、の二つのセクションを記述する』ため。
documentationそれは、(上部と下部すなわち)のAndroid用iOSと異なるオプションのための「tabBarOptions」を提供することが可能である