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:
@@ -14,4 +14,4 @@ export abstract class ButtonBase extends TextBase implements ButtonDefinition {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonBase.prototype.recycleNativeView = true;
|
||||
// ButtonBase.prototype.recycleNativeView = true;
|
||||
@@ -52,10 +52,12 @@ export class Button extends ButtonBase {
|
||||
|
||||
public initNativeView(): void {
|
||||
(<any>this.nativeView).clickListener.owner = this;
|
||||
super.initNativeView();
|
||||
}
|
||||
|
||||
public disposeNativeView() {
|
||||
(<any>this.nativeView).clickListener.owner = null;
|
||||
super.disposeNativeView();
|
||||
}
|
||||
|
||||
@PseudoClassHandler("normal", "highlighted", "pressed", "active")
|
||||
|
||||
Reference in New Issue
Block a user