image not showing ios 14 react native simulatyor code example

Example 1: react native image not working ios 14

#pragma mark - CALayerDelegate- (void)displayLayer:(CALayer *)layer{  if (_currentFrame) {    layer.contentsScale = self.animatedImageScale;    layer.contents = (__bridge id)_currentFrame.CGImage;  } else {    [super displayLayer:layer];  }}

Example 2: images not appearing in react native ios

// Add this in RCTUIImageViewAnimated.m

// .
// .
// .
// previous code.
#pragma mark - CALayerDelegate

- (void)displayLayer:(CALayer *)layer
{
    if (_currentFrame) {
        layer.contentsScale = self.animatedImageScale;
        layer.contents = (__bridge id)_currentFrame.CGImage;
      } 
  else {[super displayLayer:layer];}  // <---- add this 
      
}