Skip to content

Commit 42918b4

Browse files
committed
Touchable animation
1 parent 141dfb4 commit 42918b4

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

packages/react-native-gesture-handler/apple/RNGestureHandlerButton.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
*/
5252
- (void)applyStartAnimationState;
5353

54+
#if TARGET_OS_TV
55+
- (void)handleAnimatePressIn;
56+
- (void)handleAnimatePressOut;
57+
#endif // TARGET_OS_TV
58+
5459
/**
5560
* Resets all transient press/animation state so the button can be safely reused
5661
* by Fabric view recycling. Cancels pending press-out blocks, removes in-flight

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ - (void)emitPressOutEvent
7878
{
7979
[_buttonView sendActionsForControlEvents:UIControlEventTouchUpInside];
8080
}
81+
82+
- (void)animatePressIn
83+
{
84+
[_buttonView handleAnimatePressIn];
85+
}
86+
87+
- (void)animatePressOut
88+
{
89+
[_buttonView handleAnimatePressOut];
90+
}
8191
#endif // TARGET_OS_TV
8292

8393
- (void)prepareForRecycle

0 commit comments

Comments
 (0)