forked from slashhuang/react-native-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ios.js
48 lines (42 loc) · 1.12 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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
Navigator
} from 'react-native';
import IndexPage from './components/index.js';
/**
* API测试代码
*/
//import ApiTest from './components/test.js';
/*======= end =======*/
class mockTMall extends Component {
render() {
return (
<Navigator
tintColor='#cccccc'
barTintColor='#cccccc'
initialRoute={{ name: 'indexPage', component: IndexPage }}
/**
* 切换界面方式,只能向前切换,不能向后切换
*/
configureScene={(route) => {
let gestureType = Navigator.SceneConfigs.HorizontalSwipeJump;
gestureType.gestures.jumpForward=null;
return gestureType
}}
renderScene={(route, navigator) => {
let Component = route.component;
return <Component {...route.params} {...route} navigator={navigator} />
}}>
</Navigator>
);
}
}
AppRegistry.registerComponent('mockTMall', () => mockTMall);