Issue
I previously use to use the following to remove the Windows back arrow (as suggested here):
private hideWindowsTitleBackArrow(): void {
try {
let w: any = window;
if (w.cordova != undefined && w.cordova.platformId == "windows") {
let currentView = w.Windows.UI.Core.SystemNavigationManager.getForCurrentView();
currentView.appViewBackButtonVisibility = w.Windows.UI.Core.AppViewBackButtonVisibility.collapsed;
}
} catch (error) {
this.logger.error(`Error in hideWindowsTitleBackArrow: ${error}`);
}
}
When I run this now after my Ionic 4 update, now get the following warning..
The method Windows.UI.ApplicationSettings.SettingsPane.getForCurrentView has been deprecated. SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.
And it no longer works...
Is there perhaps an updated way of doing this?
Solution
It seems the code above still works, however, I now need to call it a bit later.
Previously I would call straight after platform.ready()
ie
private async initializeApp() : Promise<void> {
try {
await this.platform.ready();
this.statusBar.styleDefault();
this.hideWindowsTitleBackArrow();
To get it to work I now put the call in a timer...
setTimeout(() => this.hideWindowsTitleBackArrow(), 100);
Answered By - peterc
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.