diff --git a/modules/expo-selectable-text/ios/ExpoUITextView.swift b/modules/expo-selectable-text/ios/ExpoUITextView.swift index 4f4c11ce79..296f9f2abc 100644 --- a/modules/expo-selectable-text/ios/ExpoUITextView.swift +++ b/modules/expo-selectable-text/ios/ExpoUITextView.swift @@ -2,12 +2,14 @@ import ExpoModulesCore class ExpoUITextView: ExpoView { var textView: UITextView - var textChildren: [ExpoUITextViewChild] = [] + var textChildren: [ExpoUITextViewChild] = [] { + didSet { + self.setText() + } + } let onTextLayout = EventDispatcher() - // Props - public required init(appContext: AppContext? = nil) { if #available(iOS 16.0, *) { textView = UITextView(usingTextLayoutManager: false) @@ -149,8 +151,6 @@ class ExpoUITextView: ExpoView { // Save the children for our onPress handler self.textChildren = children - // Update the UITextView with the styled text - self.setText() } func setText() -> Void {