Fix issue where Svg never draws if mounted while parent is hidden (iOS only)

This commit is contained in:
James Reggio
2018-03-15 11:17:27 -04:00
parent 824a181a3d
commit ca9855b1cd
+10
View File
@@ -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];