Update offscreen image fix with window checking
Summary:
This commit is contained in:
Родитель
eab7b00cee
Коммит
bb883bfb61
|
@ -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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче