navigation_tab导航栏

一、底部导航初步

import React from \'react\'; import { Text, View } from \'react-native\'; import { createBottomTabNavigator } from \'react-navigation\'; class HomeScreen extends React.Component { render() { return ( <View style={{ flex: 1, justifyContent: \'center\', alignItems: \'center\' }}> <Text>Home!</Text> </View> ); } } class SettingsScreen extends React.Component { render() { return ( <View style={{ flex: 1, justifyContent: \'center\', alignItems: \'center\' }}> <Text>Settings!</Text> </View> ); } } export default createBottomTabNavigator({ Home: HomeScreen, Settings: SettingsScreen, });

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zggjdw.html