Skip to content

Commit 123423c

Browse files
Tom Cheungfacebook-github-bot
Tom Cheung
authored andcommitted
Fix image cannot show in iOS 14 (#29420)
Summary: This PR is to fix #29279, which image cannot show in iOS 14 As #29279 (comment) mention, this issue can be fixed by calling ` [super displayLayer:layer];` it it is still image, to let `UIImageView` handle still image rendering ## Changelog [iOS] [Fixed] - Fix image cannot show in iOS 14 Pull Request resolved: #29420 Test Plan: Image can be shown in iOS 14 build with Xcode 12 beta, using ```js <Image source={require('./images/some_local_image.jpg')}/> ``` It may also need to test gif image is render correctly ```js <Image source={{uri: 'https://some_remote_gif_image.gif'}}/> ``` Reviewed By: p-sun Differential Revision: D22619448 Pulled By: shergin fbshipit-source-id: f4d0ad83af945a6b8099d4eaea5a5f1933c7bfd2
1 parent b78d705 commit 123423c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Libraries/Image/RCTUIImageViewAnimated.m

+2
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ - (void)displayLayer:(CALayer *)layer
285285
if (_currentFrame) {
286286
layer.contentsScale = self.animatedImageScale;
287287
layer.contents = (__bridge id)_currentFrame.CGImage;
288+
} else {
289+
[super displayLayer:layer];
288290
}
289291
}
290292

0 commit comments

Comments
 (0)