
react-native
Luyc_Han
努力过后幸福总是来的如此突然
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
error Received malformed response from registry for undefined. The registry may be down.
安装React Native 执行react-native init RNDemo 出现报错 error Received malformed response from registry for undefined. The registry may be down. 解决方法 npm config set registry https://registry.npm.taobao.org原创 2017-03-21 17:11:17 · 18023 阅读 · 0 评论 -
Navigator&正逆向传值&跳转动画&自定义Navigator
Navigatorimport React,{Component} from 'react'; import { AppRegistry, StyleSheet, Text, View, Navigator,} from 'react-native'; import Oneview from './oneview'export default class na原创 2017-03-30 12:02:00 · 1489 阅读 · 0 评论 -
TabBarIOS,TabBarIOS.Item
import React,{Component} from 'react'; import { AppRegistry, StyleSheet, Text, View, TabBarIOS, AlertIOS,} from 'react-native'; var one = 'https://img.alicdn.com/imgextra/i1/222原创 2017-03-30 10:04:48 · 1395 阅读 · 0 评论 -
获取当前屏幕的宽高和像素点
import React, {Component} from 'react'; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件 View,//视图组件 Image,//图片组件 TextInput, ScrollView, } from 'react-native';//引入像素点库原创 2017-03-23 13:52:42 · 1793 阅读 · 0 评论 -
输出和引入js文件 module.exports
需要输出的类import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, } from 'react-native';var Dimensions = require('Dimensions'); //获取屏幕宽度 var screenWidth = Di原创 2017-03-23 13:48:00 · 5628 阅读 · 0 评论 -
TouchableHighlight简单使用
//相当于button使用 <TouchableHighlight //点击后的背景颜色 underlayColor="#1FB579" //设置点击事件 onPress={hanwanjie}原创 2017-03-23 13:40:38 · 7313 阅读 · 0 评论 -
RN图片资源读取
一种读取RN项目本地资源 <Image source={require('./resources/images/loginImage.png')} />一种读取ios项目本地资源直接写图片名字 <Image source={require('loginImage.png')} />一种读取网络图片资源 如果读取http网络图片资源需要更改info.plish中的网络权限 <Image sour原创 2017-03-23 10:24:20 · 1395 阅读 · 0 评论 -
图片resizeMode
resizeMode有三种模式 /* * cover 等比例拉伸、 * strech保持原有大小 * contain 图片拉伸充满空间 * */ resizeMode:’contain’,原创 2017-03-23 10:20:17 · 1221 阅读 · 0 评论 -
轮播图简单实现
import React, {Component} from 'react'; import { AppRegistry, StyleSheet, Text, View, ScrollView, Image, AlertIOS,} from 'react-native';var TimerMixin = require('react-timer原创 2017-03-29 17:36:37 · 512 阅读 · 0 评论 -
iOS使用react-native时按cmd+r不能刷新模拟器?
iOS使用react-native时按cmd+r不能刷新模拟器原创 2017-03-22 17:45:50 · 3809 阅读 · 0 评论 -
九宫格布局
import React,{Component} from 'react';import { AppRegistry, StyleSheet, Text, View, ListView, AlertIOS, } from 'react-native';var Dimensions = require('Dimensions');var width =原创 2017-03-29 13:43:11 · 430 阅读 · 0 评论 -
ListView 分组展示
import React, {Component} from 'react'; import { AppRegistry, StyleSheet, Text, View, ListView, TouchableOpacity, } from 'react-native';// var Car = require('./Car.json');export原创 2017-03-29 11:29:45 · 473 阅读 · 0 评论 -
constructor()构造函数和setInterval()定时器
import React, { Component } from ‘react’; import { AppRegistry, Text, View } from ‘react-native’;class Blink extends Component { //构造函数 constructor(props) { super(props); this.state = {原创 2017-03-22 17:02:53 · 372 阅读 · 0 评论 -
alignSelf
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件原创 2017-03-22 15:20:42 · 572 阅读 · 0 评论 -
flexWrap
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件原创 2017-03-22 15:19:39 · 350 阅读 · 0 评论 -
justifyContent和alignItems
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件原创 2017-03-22 15:18:09 · 631 阅读 · 0 评论 -
react-native 笔记StyleSheet
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件原创 2017-03-22 15:15:22 · 921 阅读 · 0 评论 -
ListView
import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, ListView, TouchableOpacity, AlertIOS, } from 'react-native';var dataSources = ['1','1原创 2017-03-29 10:07:00 · 294 阅读 · 0 评论 -
TouchableOpacity
import React,{Component} from 'react'; import { AppRegistry, StyleSheet, Text, View, TouchableOpacity, AlertIOS, } from 'react-native';class test1 extends Component{ state =原创 2017-03-27 11:51:38 · 1585 阅读 · 0 评论