-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ios.js
More file actions
48 lines (40 loc) · 958 Bytes
/
index.ios.js
File metadata and controls
48 lines (40 loc) · 958 Bytes
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
'use strict';
var React = require('react-native');
var Browse = require('./App/Components/Browse');
var Main = require('./App/Components/Main');
var {
AppRegistry,
Navigator,
StyleSheet,
Text,
View
} = React;
var Pianoshelf = React.createClass ({
renderScene(route, nav) {
var props = route.passProps || {};
props.navigator = nav;
if (route.component) {
return React.createElement(route.component, props);
}
},
render() {
return (
<Navigator
initialRoute={{name: 'Main', component: Main}}
renderScene={this.renderScene}
configureScene={(route) => {
if (route.sceneConfig) {
return route.sceneConfig;
}
return Navigator.SceneConfigs.FloatFromBottom;
}}/>
);
}
});
var styles = StyleSheet.create({
container: {
flexDirection: 'row',
flex: 1
},
});
AppRegistry.registerComponent('pianoshelf', () => Pianoshelf);