RN - Native 联调

react-native-vector-icons / iconfont 引用

官方文档 仅供参考,我们使用的是自定义 icon,因此操作上略有不同:

iOS

  1. fontello.ttf文件拖动到项目中(可以新建 Resources group,并拖动到其中),注意勾选 Copy items if needed / Create groups / Add to targets;
  2. 编辑 Info.plist,添加一行 Fonts provided by application,并添加子项 fontello.ttf

Android

fontello.ttf 文件覆盖到 android/app/src/main/assets/fonts 目录下

如果需要使用 Icon.getImageSource 或着在 TabBar / NavigatorIOS 中使用 Icon,还需要额外配置,可参考官方文档


react-native-linear-gradient / 渐变效果

参考 官方文档 相关平台章节

你可能感兴趣的:(RN - Native 联调)