Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS image not showing in React Native 0.62.2 #31267

Closed
Abdealikw opened this issue Mar 30, 2021 · 1 comment
Closed

IOS image not showing in React Native 0.62.2 #31267

Abdealikw opened this issue Mar 30, 2021 · 1 comment

Comments

@Abdealikw
Copy link

I was having issue with image not working in ios in RN 0.62.2
Here is the diff that solved my problem:

diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 21f1a06..d106e1b 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -273,9 +273,11 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink
 - (void)displayLayer:(CALayer *)layer
 {
   if (_currentFrame) {
-    layer.contentsScale = self.animatedImageScale;
-    layer.contents = (__bridge id)_currentFrame.CGImage;
-  }
+  layer.contentsScale = self.animatedImageScale;
+  layer.contents = (__bridge id)_currentFrame.CGImage;
+ } else {
+  [super displayLayer:layer];
+ }
 }
 
 #pragma mark - Util

This issue body was partially generated by patch-package.

@cortinico
Copy link
Contributor

Closed as invalid (not following the issue template)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants