The available learning materials on the Internet now include some of the books ' available learning materials that are told when you set the icon for the Tabbarios component and the check icon.
[JavaScript]View PlainCopy
- <tabbarios.item
- Icon = {require (' Image!icon_tabbar_mine ')}
- Selectedicon = {require (' image!icon_tabbar_mine_selected ')}
- </TabBarIOS.Item>
Then you run the project but always find that your icon is always the system default blue Tintcolor ... I don't think it's a solution.
Trace to RN for Tabbaritem's icon and Selectedicon packaging only know, for these two properties, RN basically did not deal with, even did not set the Selectedicon this attribute. Pit bar, pit ah. Don't say much nonsense, here is the solution:
1. Add a property to control whether to display the original image on the Tabbar
Path to file: Project--
1.1 Path:xcode-> Project
2. Process the code that sets icon
3. Handle the selected icon i.e. Selectedicon
======================== you're done, look at how to use the ===================.
This is a bool value, you can do it for a good look:renderasoriginal = {ture}
Tabbarios icon and Selectedicon are not valid after setting