Update offscreen image fix with window checking

Summary:
This commit is contained in:
Alex Akers 2015-08-04 08:17:39 -07:00
Родитель eab7b00cee
Коммит bb883bfb61
1 изменённых файлов: 4 добавлений и 11 удалений

Просмотреть файл

@ -177,21 +177,14 @@ RCT_NOT_IMPLEMENTED(-init)
} }
} }
- (void)willMoveToSuperview:(UIView *)newSuperview - (void)didMoveToWindow
{ {
[super willMoveToSuperview:newSuperview]; [super didMoveToWindow];
if (!newSuperview) { if (!self.window) {
[self.layer removeAnimationForKey:@"contents"]; [self.layer removeAnimationForKey:@"contents"];
self.image = nil; self.image = nil;
} } else if (self.src) {
}
- (void)didMoveToSuperview
{
[super didMoveToSuperview];
if (self.superview && self.src) {
[self reloadImage]; [self reloadImage];
} }
} }