我只是在我的搜索图标应该在的位置看到一个问号图标。还为我的其他字体获取无法识别的字体。
<SearchBar
round
containerStyle={{
borderTopWidth: 0,
borderBottomWidth: 0
}}
inputStyle={{ backgroundColor: "white" }}
inputContainerStyle={{
borderRadius: 5,
backgroundColor: "white"
}}
icon={{
type: "fontAwesome",
color: "#86939e",
name: "fa-search"
}}
onSubmitEditing={this.onSubmitEdit}
searchIcon={{ size: 18 }}
onChangeText={text => this.SearchFilterFunction(text)}
onClear={text => this.SearchFilterFunction("")}
placeholder="Type Here..."
value={term}
/>
除了我的 serahc 图标没有出现,我无法让我的字体显示使用:
menuText: {
fontSize: 15,
color: "#fff",
opacity: 1,
fontFamily: "lato-regular",
textTransform: "uppercase"
}
我已经链接了包,并将字体文件复制到 xcode 中。
我所有的字体都出现Resources
在 xcode 中。如何显示我的图标?
我在 info.plist 中有我的字体:
<key>UIAppFonts</key>
<array>
<string>Lato-Regular.ttf</string>
<string>Lato-Light.ttf</string>
<string>FontAwesome.ttf</string>
<string>Lato-Bold.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Lato-Black.ttf</string>
<string>Lato-BlackItalic.ttf</string>
<string>Lato-BoldItalic.ttf</string>
<string>Lato-Hairline.ttf</string>
<string>Lato-HairlineItalic.ttf</string>
<string>Lato-Heavy.ttf</string>
<string>Lato-HeavyItalic.ttf</string>
<string>Lato-Italic.ttf</string>
<string>Lato-LightItalic.ttf</string>
<string>Lato-Medium.ttf</string>
<string>Lato-MediumItalic.ttf</string>
<string>Lato-Semibold.ttf</string>
<string>Lato-SemiboldItalic.ttf</string>
<string>Lato-Thin.ttf</string>
<string>Lato-ThinItalic.ttf</string>
<string>SpaceMono-Regular.ttf</string>
</array>