Tabbarios icon and Selectedicon are not valid after setting

Source: Internet
Author: User

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 
    1. <tabbarios.item
    2. Icon = {require (' Image!icon_tabbar_mine ')}
    3. Selectedicon = {require (' image!icon_tabbar_mine_selected ')}
    4. </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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.