Skip to content

Commit

Permalink
Fix buttons size in dark mode (#7606)
Browse files Browse the repository at this point in the history
  • Loading branch information
yogevbd authored Sep 19, 2022
1 parent 3c29ef5 commit c2b1364
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ios/RNNUIBarButtonItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ - (instancetype)initCustomIcon:(RNNButtonOptions *)buttonOptions
UIImage *icon = [iconCreator create:buttonOptions];
UIButton *button =
[[UIButton alloc] initWithFrame:CGRectMake(0, 0, icon.size.width, icon.size.height)];

[button addTarget:self
action:@selector(onButtonPressed:)
forControlEvents:UIControlEventTouchUpInside];
[button setImage:icon
forState:buttonOptions.isEnabled ? UIControlStateNormal : UIControlStateDisabled];

[button.widthAnchor constraintEqualToConstant:icon.size.width].active = YES;
[button.heightAnchor constraintEqualToConstant:icon.size.height].active = YES;
self = [super initWithCustomView:button];
[self applyOptions:buttonOptions];
self.onPress = onPress;
Expand Down

0 comments on commit c2b1364

Please sign in to comment.