From daedd1f671fc933af27e2953b52b3a08eddb7c92 Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 16 Jan 2024 15:47:24 -0800 Subject: [PATCH] move getChildren to didMoveToWindow --- modules/expo-selectable-text/ios/ExpoUITextView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/expo-selectable-text/ios/ExpoUITextView.swift b/modules/expo-selectable-text/ios/ExpoUITextView.swift index b9d5bef9c1..ebef6098a5 100644 --- a/modules/expo-selectable-text/ios/ExpoUITextView.swift +++ b/modules/expo-selectable-text/ios/ExpoUITextView.swift @@ -49,7 +49,6 @@ class ExpoUITextView: ExpoView { override func insertReactSubview(_ subview: UIView!, at atIndex: Int) { if subview.isKind(of: ExpoUITextViewChild.self) { insertSubview(subview, at: atIndex) - self.getTextChildren() } } @@ -64,6 +63,10 @@ class ExpoUITextView: ExpoView { return subviews } + override func didMoveToWindow() { + self.getTextChildren() + } + override func layoutSubviews() { // Get the width from the bounds let maxWidth = bounds.width