Disable recycling of native views

createNativeView will set iOS nativeView if it is null/undefined
This commit is contained in:
Hristo Hristov
2017-03-28 18:08:39 +03:00
parent 84e726e6b9
commit e6250e718a
59 changed files with 112 additions and 97 deletions

View File

@@ -103,7 +103,7 @@ export abstract class ImageBase extends View implements ImageDefinition {
}
}
ImageBase.prototype.recycleNativeView = true;
// ImageBase.prototype.recycleNativeView = true;
export const imageSourceProperty = new Property<ImageBase, ImageSource>({ name: "imageSource" });
imageSourceProperty.register(ImageBase);

View File

@@ -97,11 +97,13 @@ export class Image extends ImageBase {
}
public initNativeView(): void {
super.initNativeView();
(<any>this.nativeView).listener.owner = this;
}
public disposeNativeView() {
(<any>this.nativeView).listener.owner = null;
super.disposeNativeView();
}
public _createImageSourceFromSrc() {