Skip to content

Conversation

@kligarski
Copy link
Contributor

@kligarski kligarski commented Oct 27, 2025

Description

Previously, both imageSource and templateSource were handled in the same way (relying on UIKit's automatic rendering mode). To match API and current convention from Bottom Tabs, this PR handles rendering modes separately.

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-10-27.at.14.04.35.mov

Changes

  • handle imageSource and templateSource separately
  • update test screen to match react-navigation API

Test code and steps to reproduce

Run BarButtonItems test screen. Open Icon Button example. Change tinted in button configuration from false to true.

Checklist

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thank you!

} else if (templateSourceObj) {
imageWithRenderingMode = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
}
self.image = imageWithRenderingMode;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we need additional PR here, that will refactor out this code & share it between here & header config.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kligarski kligarski merged commit b71c766 into main Nov 3, 2025
6 checks passed
@kligarski kligarski deleted the @kligarski/fix-bar-button-icon-rendering-modes branch November 3, 2025 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants