fix(ios): Ensure ObserverClass is initialized (#8365)

This commit is contained in:
Darin Dimitrov
2020-02-23 17:46:01 +02:00
committed by GitHub
parent 398457c528
commit 06b9ecf80b

View File

@ -22,7 +22,7 @@ export class ControlStateChangeListener implements ControlStateChangeListenerDef
private _callback: (state: string) => void;
constructor(control: UIControl, callback: (state: string) => void) {
this._observer = ObserverClass.alloc();
this._observer = ObserverClass.alloc().init();
this._observer["_owner"] = this;
this._control = control;
this._callback = callback;