Skip to content

Commit f30c46e

Browse files
robhoganfacebook-github-bot
authored andcommitted
Fix "paused on debugger" overlay icon (#48736)
Summary: Pull Request resolved: #48736 Pull Request resolved: #48735 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 Reviewed By: cipolleschi Differential Revision: D68274336 fbshipit-source-id: 3f4b84eb7cfb518ca953c721da9885df8f98b437
1 parent 6fa4cc6 commit f30c46e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: packages/react-native/React/DevSupport/RCTPausedInDebuggerOverlayController.mm

+3-5
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)