react-native-vector-icons 之 ios 配置

一、github 地址

    https://github.com/oblador/react-native-vector-icons

二、配置开始

1.安装

    npm install --save react-native-vector-icons

2.打开 插件 文件夹

    open node_modules/react-native-vector-icons/

3.拖拽第二步导入打开的文件夹里面的 Fonts 到 Xcode 项目的项目根目录(图二),弹出框里面选项如下(图一)

图一
图二

4.用记事本打开 info.plist 文件夹

5.在打开的info.plist中添加如下内容

UIAppFonts

  AntDesign.ttf

  Entypo.ttf

  EvilIcons.ttf

  Feather.ttf

  FontAwesome.ttf

  FontAwesome5_Brands.ttf

  FontAwesome5_Regular.ttf

  FontAwesome5_Solid.ttf

  Foundation.ttf

  Ionicons.ttf

  MaterialIcons.ttf

  MaterialCommunityIcons.ttf

  SimpleLineIcons.ttf

  Octicons.ttf

  Zocial.ttf

  Fontisto.ttf

6.保存第5的步,然后 Xcode Clean 一下(Cmd + Shif + K),运行即可

你可能感兴趣的:(react-native-vector-icons 之 ios 配置)