1 Star 0 Fork 71

maxid/oscApp

forked from lclz/oscApp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index0.ios.js 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
lilw 提交于 2016-01-19 18:42 . init
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import NavigatorWrapper from "./ios_views/common/NavigatorWrapper"
import News from "./ios_views/news/news_list"
import Home from "./home"
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
TabBarIOS,
Navigator,
NavigatorIOS
} = React;
var oscApp = React.createClass({
getInitialState:function(){
return {
component:Home,
}
},
_renderContent:function(contentTab,color){
return (
<View style={styles.contentTab}>
<Text style={[styles.contentText,{color:color}]}>{contentTab}</Text>
</View>
)
},
render: function() {
return (
// <Navigator
// initialRoute={{name: '', component: this.state.component, index:0}}
// configureScene={()=>{return Navigator.SceneConfigs.FloatFromBottom;}}
// renderScene={(route, navigator) => {
// const Component = route.component;
// return (
// <View style={{flex: 1}}>
// <Component navigator={navigator} route={route} {...route.passProps}/>
// </View>
// );
// }}
// />
<NavigatorIOS
style={styles.container}
initialRoute={{
component: this.state.component,
title: '综合',
passProps: {
},
}}
tintColor="#FFFFFF"
barTintColor="#4ead7d"
titleTextColor="#FFFFFF"
translucent={false}
/>
);
}
});
var styles = StyleSheet.create({
container:{
flex:1,
elevation:1
},
contentTab:{
flex:1,
alignItems:'center',//水平居中
justifyContent:'center'//垂直居中
},
contentText:{
},
});
AppRegistry.registerComponent('oscApp', () => oscApp);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/istyle/oscApp.git
git@gitee.com:istyle/oscApp.git
istyle
oscApp
oscApp
master

搜索帮助