diff --git a/ios/Elements/RNSVGSvgView.m b/ios/Elements/RNSVGSvgView.m index 46065fac..5a50797c 100644 --- a/ios/Elements/RNSVGSvgView.m +++ b/ios/Elements/RNSVGSvgView.m @@ -20,6 +20,16 @@ CGAffineTransform _viewBoxTransform; } +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + // This is necessary to ensure that [self setNeedsDisplay] actually triggers + // a redraw when our parent transitions between hidden and visible. + self.contentMode = UIViewContentModeRedraw; + } + return self; +} + - (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex { [super insertReactSubview:subview atIndex:atIndex];