React Native使用 在React Native中使用ART React Native ART

Android自带ART,不用导入。iOS要使用需要使用xcode打开react native 的ios目录,

1、使用xcode中打开react-native中的ios项目,选中‘Libraries’目录 ——> 右键选择‘Add Files to 项目名称’ ——> 'node_modules/react-native/Libraries/ART/ART.xcodeproj' 添加;


2、选中项目根目录 ——> 点击’Build Phases‘ ——> 点击‘Link Binary With Libraries’ ——> 点击左下方‘+’ ——> 选中‘libART.a’添加。


感谢奋斗的orange 提供,转载原文http://blog.csdn.net/u010940770/article/details/71126700

如果要使用svg作为渲染,使用react-native-art-svg ,请看https://www.jianshu.com/p/cd11b8fbff66;

以下是个人记录:

1. svg的设计要使用局中描边;

2. 画扇形 

import React from 'react'

  import {

      View,

      ART

  } from  'react-native'

  const {Surface} = ART;

  import Wedge from './Wedge'

  export default class Fan extends  React.Component{

      render(){

          return(

                      outerRadius={50}

                      startAngle={0}

                      endAngle={60}

                      originX={50}

                      originY={50}

                      fill="blue"/>

          )

      }

}

链接:https://www.jianshu.com/p/8e6544ee647f

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容