Repository navigation
Expand file tree
/
Copy pathapp.ios.js
More file actions
67 lines (61 loc) · 1.67 KB
/
Copy pathapp.ios.js
File metadata and controls
67 lines (61 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* eslint-disable no-unused-vars */
import React, { Component } from 'react';
import { View } from 'react-native';
import { Navigation } from 'react-native-navigation';
import { registerScreens } from './screens';
import { iconsMap, iconsLoaded } from './utils/AppIcons';
registerScreens();
const navigatorStyle = {
statusBarColor: '#831d19',
navigationBarColor: '#339999',
navBarBackgroundColor: '#339999',
navBarTextColor: '#ffffff',
navBarButtonColor: '#ffffff',
statusBarTextColorScheme: 'light',
navBarHidden: true,
tabBarButtonColor: 'red',
tabBarSelectedButtonColor: 'red',
tabBarBackgroundColor: 'red'
};
class App extends Component {
constructor(props) {
super(props);
iconsLoaded.then(() => {
this.startApp();
});
}
startApp() {
Navigation.startTabBasedApp({
tabs: [
{
label: 'One',
screen: 'rn.FirstTabScreen',
icon: iconsMap['ios-person'],
selectedIcon: iconsMap['ios-person'],
title: 'Hello World',
navigatorStyle
},
{
label: 'Two',
screen: 'rn.SecondTabScreen',
icon: iconsMap['ios-chatbubbles'],
selectedIcon: iconsMap['ios-chatbubbles'],
title: 'Test Title 2',
navigatorStyle
}
],
tabsStyle: {
},
drawer: { // optional, add this if you want a side menu drawer in your app
left: { // optional, define if you want a drawer from the right
screen: 'rn.FirstDrawerScreen' // unique ID registered with Navigation.registerScreen
},
right: { // optional, define if you want a drawer from the right
screen: 'rn.SecondDrawerScreen' // unique ID registered with Navigation.registerScreen
}
},
animationType: 'slide-down'
});
}
}
export default App;