Skip to content

Commit

Permalink
Add back macOS tintColor implementation (facebook#1801)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi authored Apr 26, 2023
1 parent 48e9455 commit f6eb1d8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Libraries/Image/RCTImageView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,28 @@ - (void)didMoveToWindow
[self reloadImage];
}
}

#if TARGET_OS_OSX // [macOS
- (void)windowDidChangeBackingProperties:(NSNotification *)notification
{
[self reloadImage];
}

- (RCTPlatformView *)reactAccessibilityElement
{
return _imageView;
}

- (NSColor *)tintColor
{
return _imageView.contentTintColor;
}

- (void)setTintColor:(NSColor *)tintColor
{
_imageView.contentTintColor = tintColor;
}
#endif // macOS]

- (void)dealloc
{
Expand Down

0 comments on commit f6eb1d8

Please sign in to comment.