React-native iOS not showing images (pods issue)

后端 未结 1 415
被撕碎了的回忆
被撕碎了的回忆 2021-01-05 05:52

I was installing a package in my react-native application (to be specific it was createMaterialTopTabNavigator from react-navigation) but after the installation succeed, so

相关标签:
1条回答
  • 2021-01-05 06:31

    Images issue is seen in Xcode12 builds and the fix if you are not running latest react-native version or not planning to upgrade to latest version of react-native, then go to

    node_modules > react-native > Libraries > Images > RCTUIImageViewAnimated.m search for if (_currentFrame)

    add the following else block to the if block as below

     if (_currentFrame) {
        layer.contentsScale = self.animatedImageScale;
        layer.contents = (__bridge id)_currentFrame.CGImage;
      } else {
        [super displayLayer:layer];
      }
    

    Ref : https://github.com/facebook/react-native/issues/29279#issuecomment-658244428

    0 讨论(0)
提交回复
热议问题