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' 添加;


React Native使用 在React Native中使用ART React Native ART_第1张图片

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


React Native使用 在React Native中使用ART React Native ART_第2张图片

感谢奋斗的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

你可能感兴趣的:(React Native使用 在React Native中使用ART React Native ART)