Created
April 29, 2015 15:46
-
-
Save johanneslumpe/e6e6e2152b96663db4a9 to your computer and use it in GitHub Desktop.
React native tabbar rotation bug demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
NavigatorIOS, | |
TabBarIOS, | |
View | |
} = React; | |
class DemoItem extends Component { | |
render() { | |
return <View style={{backgroundColor:'#f00', flex: 1}} />; | |
} | |
} | |
class Demo extends Component { | |
render() { | |
return ( | |
<TabBarIOS> | |
<TabBarIOS.Item | |
title="Demo" | |
systemIcon="contacts" | |
selected={true}> | |
<NavigatorIOS | |
style={styles.navigator} | |
initialRoute={{ | |
component: DemoItem, | |
title: 'Demo' | |
}}/> | |
</TabBarIOS.Item> | |
</TabBarIOS> | |
); | |
} | |
} | |
var styles = StyleSheet.create({ | |
navigator: { | |
flex: 1, | |
marginBottom:20 | |
}, | |
}); | |
AppRegistry.registerComponent('demo', () => Demo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment