React-native-navigation: [V3] TopBar Icon color is always blue on iOS 13

Created on 13 Nov 2019  路  2Comments  路  Source: wix/react-native-navigation

Issue Description

I'm trying to set topBar icons with custom colors, but they're always defaulting to blue on iOS 13.

Steps to Reproduce / Code Snippets / Screenshots

image

Same thing happens in playground:

image

in both instances the icons are supposed to be red. If I remove the color from config, the image color will be used (black).

    rightButtons: [
      {
        id: 'add-shelf',
        icon: require('../../../assets/ui/book-library.png'),
        color: 'red',
      },

Environment

  • React Native Navigation version: 3.5.1
  • React Native version: 0.61.4
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): 13.2 Simulator
iOS 13 iOS acceptebug

Most helpful comment

Fixed in 9f43bca3573e8833eb8219c6e7a829d8d92faac0

All 2 comments

It seems like this is the same issue as: #5647 I tried their solution (calling mergeOptions after mount), and it fixes the issue.

  useNavigationComponentDidAppear(() => {
    Navigation.mergeOptions(componentId, {
      topBar: {
        rightButtons: [
          {
            id: 'add-shelf',
            icon: require('../../../assets/ui/medical-room-wait.png'),
            color: '#ffffff',
          },
        ],
      },
    });
  }, componentId);

Fixed in 9f43bca3573e8833eb8219c6e7a829d8d92faac0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdrobinson picture bdrobinson  路  3Comments

kiroukou picture kiroukou  路  3Comments

yedidyak picture yedidyak  路  3Comments

birkir picture birkir  路  3Comments

Chipped1 picture Chipped1  路  3Comments