无法在iOS上显示“ react-native-vector-icons”的“编辑”图标

时间:2019-08-26 14:02:38

标签: react-native react-native-vector-icons

我正在研究React Native应用程序。我正在使用反应本机矢量图标。我无法显示编辑图标,这是我的代码

import Icon from 'react-native-vector-icons/FontAwesome';    

<Icon style={{marginTop : '1.5%'}} name="Edit"/>

这显示了问号而不是图标。

但是如果我这样做

import Icon from 'react-native-vector-icons/FontAwesome';    

<Icon style={{marginTop : '1.5%'}} name="area-chart"/>

我得到“面积图”图标。为什么“面积图”图标有效,而不是“编辑”图标。

2 个答案:

答案 0 :(得分:1)

我认为姓名应使用小写字母,

<Icon style={{marginTop : '1.5%'}} name="edit"/>

有关更多信息,请参见thisthis

答案 1 :(得分:1)

尝试使用type =“ font-awesome” <Icon style={{marginTop : '1.5%'}} type="font-awesome" color: "pickYourColor" name="edit"/>