Reputation: 57
I have been searching for a clean way to use Font Icons (iconmoon in my case) for TabViewItem
but have not found an answer. Does anyone know how to do it?
I am using NativeScript-Vue. The ideal way of doing it would be by changing the iconSource
with the font icon, but it does not work. Something like :iconSource="String.fromCharCode(0xea0d)"
The code I am using is the following (instead of labels
I have frames
inside each TabViewItem
).
<TabView :selectedIndex="selectedIndex" iosIconRenderingMode="alwaysOriginal">
<TabViewItem title="Tab 1" iconSource="~/images/icon.png">
<Label text="Content for Tab 1" />
</TabViewItem>
<TabViewItem title="Tab 2" iconSource="~/images/icon.png">
<Label text="Content for Tab 2" />
</TabViewItem>
</TabView>
Upvotes: 2
Views: 773
Reputation: 21898
It's not possible to use font icon on iconSource
, it would accept only images.
But you could either use font icon on the title
attribute but that may prevent you from styling your title with a different font Or you could use the nativescript-vector-icons which can convert the font icon into image on the fly and apply it to iconSource
.
Upvotes: 1