mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Disable recycling of native views
createNativeView will set iOS nativeView if it is null/undefined
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user