From 80cee5f1fc7fe346f0cb2ca0fffcde388957d32b Mon Sep 17 00:00:00 2001 From: Sebastian Thiebaud Date: Thu, 18 Dec 2025 12:55:02 -0800 Subject: [PATCH] fix(ios): Prevent transparent colors from making icons invisible --- ios/Shared/RCTMenuItem.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ios/Shared/RCTMenuItem.swift b/ios/Shared/RCTMenuItem.swift index bb6bb2b7..72ff60a0 100644 --- a/ios/Shared/RCTMenuItem.swift +++ b/ios/Shared/RCTMenuItem.swift @@ -33,7 +33,18 @@ class RCTMenuAction { self.image = UIImage(named: image as String) } if let imageColor = details["imageColor"] { - self.image = self.image?.withTintColor(RCTConvert.uiColor(imageColor), renderingMode: .alwaysOriginal) + let uiColor = RCTConvert.uiColor(imageColor) + // Only apply tint if color is valid and not transparent (alpha > 0) + // processColor(undefined) returns transparent color (0,0,0,0) which makes icons invisible + if let color = uiColor { + var red: CGFloat = 0 + var green: CGFloat = 0 + var blue: CGFloat = 0 + var alpha: CGFloat = 0 + if color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) && alpha > 0 { + self.image = self.image?.withTintColor(color, renderingMode: .alwaysOriginal) + } + } } }