文件内容解析

Posted 玉思盈蝶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了文件内容解析相关的知识,希望对你有一定的参考价值。

下面是我的第一个React Native程序,也是自己对该程序的文件内容解析一些理解,注释很清楚哟,相信你一看就懂!!!!

/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

// 1.引入组件
import React, { Component } from react;
import {
  AppRegistry, // 注册
  StyleSheet,  // 样式
  Text,  // 文本组件
  View,  // 视图组件
  Image, // 图片组件
  TextInput,  //输入框组件
} from react-native;

class AwesomeProject extends Component {

  // 2. 设置界面 ---- 写结构和内容
  // 函数-- 初始化方法  相当于OC的viewDidLoad -->返回具体的组件内容
  render() {

    // 通过return()返回
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          SiSi
        </Text>
        <Text style={styles.instructions}>
          SiSi
        </Text>
        <Text style={styles.instructions}>
          SiSi
        </Text>
          <Text>Hello!{this.props.name}!
        </Text>
      </View>
    );
  }
}

// 3.设置样式
const newStyle = StyleSheet.create({

});
const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: center,
    alignItems: center,
    backgroundColor: red,
  },
  welcome: {
    fontSize: 20,
    textAlign: center,
    margin: 10,
  },
  instructions: {
    textAlign: center,
    color: #333333,
    marginBottom: 5,
  },
});

AppRegistry.registerComponent(AwesomeProject, () => AwesomeProject);

 

以上是关于文件内容解析的主要内容,如果未能解决你的问题,请参考以下文章

Android 逆向使用 Python 解析 ELF 文件 ( Capstone 反汇编 ELF 文件中的机器码数据 | 创建反汇编解析器实例对象 | 设置汇编解析器显示细节 )(代码片段

常用python日期日志获取内容循环的代码片段

如何解析 MPD 清单视频文件并获取图像适配集的片段?

vscode 用户代码片段 vue初始化模板 Snippet #新加入开头注释 自动生成文件名 开发日期时间等内容

无法解析片段中的 findViewById [重复]

jquery基本操作