Skip to content

Commit da56ad6

Browse files
robhoganfacebook-github-bot
authored andcommitted
Fix "paused on debugger" overlay icon
Summary: This icon was broken by D65457771, identified in [OSS testing for the 0.77 release](reactwg/react-native-releases#724). By explicitly setting the image for the `Disabled` state to the same as `Normal`, we get the same behaviour as the deprecated [`adjustsImageWhenDisabled = NO`](https://developer.apple.com/documentation/uikit/uibutton/adjustsimagewhendisabled?language=objc) without the need for `configurationUpdateHandler`. Changelog: [iOS][Fixed] Restore "Paused in debugger" overlay icon Differential Revision: D68274336
1 parent bc810e5 commit da56ad6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/react-native/React/DevSupport/RCTPausedInDebuggerOverlayController.mm

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ - (void)viewDidLoad
5454
]];
5555

5656
UIButton *resumeButton = [UIButton buttonWithType:UIButtonTypeCustom];
57-
[resumeButton setImage:[UIImage systemImageNamed:@"forward.frame.fill"] forState:UIControlStateNormal];
57+
UIImage *image = [UIImage systemImageNamed:@"forward.frame.fill"];
58+
[resumeButton setImage:image forState:UIControlStateNormal];
59+
[resumeButton setImage:image forState:UIControlStateDisabled];
5860
resumeButton.tintColor = [UIColor colorWithRed:0.37 green:0.37 blue:0.37 alpha:1];
5961

60-
resumeButton.configurationUpdateHandler = ^(UIButton *button) {
61-
button.imageView.tintAdjustmentMode = UIViewTintAdjustmentModeNormal;
62-
};
63-
6462
resumeButton.enabled = NO;
6563
[NSLayoutConstraint activateConstraints:@[
6664
[resumeButton.widthAnchor constraintEqualToConstant:48],

0 commit comments

Comments
 (0)