resolve animation issue, animate alt text expansion

This commit is contained in:
Hailey
2024-01-16 16:57:31 -08:00
parent daedd1f671
commit b6b0964168
2 changed files with 19 additions and 3 deletions
@@ -59,14 +59,24 @@ class ExpoUITextView: ExpoView {
}
}
// Just return the subviews
override func reactSubviews() -> [UIView]! {
return subviews
}
override func didMoveToWindow() {
// Get children on update
override func didUpdateReactSubviews() {
self.getTextChildren()
}
// For animation issues
// See: https://github.com/facebook/react-native/blob/258d8e51b451b221e557dad4647cbd210fe37392/packages/react-native/Libraries/Text/Text/RCTTextView.mm#L66
override func reactSetFrame(_ frame: CGRect) {
UIView.performWithoutAnimation {
super.reactSetFrame(frame)
}
}
override func layoutSubviews() {
// Get the width from the bounds
let maxWidth = bounds.width