Hi, everybody.
There is a problem with iOS I need some help with.
I have ion-toggle on my page.
<ion-item>
<ion-label style="white-space: normal;">{{"SETTINGS.USE_FINGERPRINT" | translate}}</ion-label>
<ion-toggle [disabled]="disabled"
[(ngModel)]="checked"
(ionChange)="toggle($event)">
</ion-toggle>
</ion-item>
The model is formed with two callbacks.
ionViewDidLoad() {
if (this.globalService.hasTouchId() || this.globalService.hasFingerprint()) {
this.storageService.getRegisteredFingerprint().then(
registeredFingerprint => {
if (this.globalService.hasTouchId()) {
this.isAvailable("touchId", registeredFingerprint);
} else if (this.globalService.hasFingerprint()) {
this.isAvailable("fingerprint", registeredFingerprint);
}
}
);
}
}
isAvailable(plugin: string, registeredFingerprint: boolean) {
window[plugin].isAvailable(
function() {
this.isAvailableOk(registeredFingerprint);
}.bind(this),
function(error) {
this.isAvailableError(error);
}.bind(this)
);
}
isAvailableOk(registeredFingerprint) {
this.checked = registeredFingerprint;
this.viewCtrl.getIONContent().resize();
}
When toggle flag is set to true, the component itself is not rendered as active.
[checked]=”checked” also doesn’t solve this.
As doesn’t page resize.
this.viewCtrl.getIONContent().resize();
Only when menu is displayed and then removed, the toggle is rendered as active.
Thanks in advance.