From 1a3cc685754ab11e7447b638e9293e0922b83ce1 Mon Sep 17 00:00:00 2001 From: louiszawadzki Date: Mon, 18 Dec 2023 17:30:39 +0100 Subject: [PATCH] Use same color as RN for default text color --- .../ios/Sources/RCTTextViewRecorder.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-session-replay/ios/Sources/RCTTextViewRecorder.swift b/packages/react-native-session-replay/ios/Sources/RCTTextViewRecorder.swift index db3afac4f..ed28132aa 100644 --- a/packages/react-native-session-replay/ios/Sources/RCTTextViewRecorder.swift +++ b/packages/react-native-session-replay/ios/Sources/RCTTextViewRecorder.swift @@ -79,8 +79,8 @@ internal class RCTTextViewRecorder: SessionReplayNodeRecorder { } } -// Black color. This is faster than accessing UIColor.black.cgColor. -let DEFAULT_COLOR = UIColor(white: 0, alpha: 1).cgColor +// Black color. This is the default for RN: https://github.com/facebook/react-native/blob/a5ee029cd02a636136058d82919480eeeb700067/packages/react-native/Libraries/Text/RCTTextAttributes.mm#L250 +let DEFAULT_COLOR = UIColor.black.cgColor internal struct RCTTextViewWireframesBuilder: SessionReplayNodeWireframesBuilder { let wireframeID: WireframeID