-
Notifications
You must be signed in to change notification settings - Fork 37
/
index.ios.js
executable file
·60 lines (51 loc) · 1.52 KB
/
index.ios.js
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
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
NavigatorIOS,
Navigator
} from 'react-native';
var ExampleList = require('./JS/Classes/Module/Menu/ExampleList');
var NavigatorExampleWithNavigationBar = require('./JS/Classes/Module/Menu/NavigatorExampleWithNavigationBar');
var MenuManager = require('NativeModules').MenuManager;
class ReactNativeRollingExamples2 extends Component {
render() {
return (
<Navigator style = {{flex: 1}}
initialRoute={{
component: NavigatorExampleWithNavigationBar
}}
renderScene={(route, navigator) => {
return <route.component navigator={navigator} {...route} {...route.passProps}/>
}}/>
);
}
}
class ReactNativeRollingExamples1 extends Component {
constructor(props) {
super(props);
this.onLeftButtonPress = this.onLeftButtonPress.bind(this);
}
onLeftButtonPress(){
MenuManager.showMenu('test',(error,events) => {
if (error) {
}else{
};
});
}
render() {
return (
<NavigatorIOS
style={{flex : 1, marginTop : 0}}
initialRoute={{
title: 'ReactNative RollingExamples',
component: ExampleList,
leftButtonTitle: 'Menu',
onLeftButtonPress: this.onLeftButtonPress,
}} /> );
}
}
AppRegistry.registerComponent('ReactNativeRollingExamples1', () => ReactNativeRollingExamples1);
AppRegistry.registerComponent('ReactNativeRollingExamples2', () => ReactNativeRollingExamples2);