Skip to content

Commit 0d51d22

Browse files
committed
Apply the resting state correctly
1 parent e2b94b7 commit 0d51d22

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ - (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetric
112112
[_buttonView updateLayoutMetrics:buttonMetrics oldLayoutMetrics:oldbuttonMetrics];
113113
}
114114

115+
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
116+
{
117+
[super traitCollectionDidChange:previousTraitCollection];
118+
[_buttonView applyStartAnimationState];
119+
}
120+
115121
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
116122
{
117123
[super finalizeUpdates:updateMask];
@@ -131,6 +137,8 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
131137
right:borderMetrics.borderWidths.right
132138
bottom:borderMetrics.borderWidths.bottom
133139
left:borderMetrics.borderWidths.left];
140+
141+
[_buttonView applyStartAnimationState];
134142
}
135143

136144
#pragma mark - RCTComponentViewProtocol

0 commit comments

Comments
 (0)