Skip to content

Commit 0a64f96

Browse files
committed
Handled disabled
1 parent c99752c commit 0a64f96

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,37 @@ - (instancetype)initWithFrame:(CGRect)frame
7171
#if TARGET_OS_TV
7272
- (void)emitPressInEvent
7373
{
74+
if (!_buttonView.userEnabled) {
75+
return;
76+
}
77+
7478
[_buttonView sendActionsForControlEvents:UIControlEventTouchDown];
7579
}
7680

7781
- (void)emitPressOutEvent
7882
{
83+
if (!_buttonView.userEnabled) {
84+
return;
85+
}
86+
7987
[_buttonView sendActionsForControlEvents:UIControlEventTouchUpInside];
8088
}
8189

8290
- (void)animatePressIn
8391
{
92+
if (!_buttonView.userEnabled) {
93+
return;
94+
}
95+
8496
[_buttonView handleAnimatePressIn];
8597
}
8698

8799
- (void)animatePressOut
88100
{
101+
if (!_buttonView.userEnabled) {
102+
return;
103+
}
104+
89105
[_buttonView handleAnimatePressOut];
90106
}
91107
#endif // TARGET_OS_TV

0 commit comments

Comments
 (0)