Skip to content

Instantly share code, notes, and snippets.

@johanneslumpe
Created April 29, 2015 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johanneslumpe/e6e6e2152b96663db4a9 to your computer and use it in GitHub Desktop.
Save johanneslumpe/e6e6e2152b96663db4a9 to your computer and use it in GitHub Desktop.
React native tabbar rotation bug demo
'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