[iOS] - Fix Custom FlyoutIcon from Being Overridden to Default Color in Shell #27580
+65
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: The color of the custom FlyoutIcon in Shell resets to the default blue instead of retaining its original color.
RootCause
By default,
UIImageRenderingMode
is set toAutomatic
, allowing the rendering behavior to be determined based on the UI context. When a customFlyoutIcon
is applied, it does not retain its original color but instead adapts to the predefined tinting behavior, leading to unintended color changes.Description of Change
The image rendering mode is now set to
UIImageRenderingMode.AlwaysOriginal
, ensuring that custom icons maintain their original colors without being altered by default rendering behavior.FlyoutIcon
is set, its color can still be modified usingShell.ForegroundColor
.FlyoutIcon
is applied, it now preserves its original image color without automatic tinting.Shell.ForegroundColor
should be set accordingly to allow the color modification to be applied.Issues Fixed
Fixes #6738
Tested the behaviour in the following platforms
Output