-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.ios.js
45 lines (36 loc) · 968 Bytes
/
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
'use strict';
var React = require('react-native');
var NavigationBar = require('react-native-navbar');
var App = require('./src/app');
var { AppRegistry, NavigatorIOS, Navigator, View } = React;
class oauthExamples extends React.Component {
renderScene(route, navigator) {
var Component = route.component;
var navBar = route.navigationBar;
if (navBar) {
navBar = React.addons.cloneWithProps(navBar, {
navigator: navigator,
route: route
});
}
return (
<View style={{flex: 1}}>
{navBar}
<Component navigator={navigator} route={route} />
</View>
);
}
render() {
return (
<Navigator
style={{flex: 1}}
renderScene={this.renderScene}
initialRoute={{
component: App,
navigationBar: <NavigationBar title="OAuth Examples"/>
}}
/>
);
}
};
AppRegistry.registerComponent('oauthExamples', () => oauthExamples);