注册

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

666ea3096338aec06871209e0ed140ed.png

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

59ab58e71f732e35b2a732a8565eba73.png

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

如果要使用svg作为渲染,使用react-native-art-svg

以下是个人记录:

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"/>

)

}

}



0 个评论

要回复文章请先登录注册