From a598e2c90ae346328cff87ff36a0c97bbd008f78 Mon Sep 17 00:00:00 2001 From: vakrilov Date: Thu, 6 Apr 2017 13:21:23 +0300 Subject: [PATCH] Ensure navigation title view is removed if undefined --- tns-core-modules/ui/action-bar/action-bar.ios.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/action-bar/action-bar.ios.ts b/tns-core-modules/ui/action-bar/action-bar.ios.ts index 29be1d64f..3d8f68438 100644 --- a/tns-core-modules/ui/action-bar/action-bar.ios.ts +++ b/tns-core-modules/ui/action-bar/action-bar.ios.ts @@ -93,6 +93,8 @@ export class ActionBar extends ActionBarBase { if (this.titleView && this.titleView.ios) { navigationItem.titleView = this.titleView.ios; + } else { + navigationItem.titleView = null; } // Find previous ViewController in the navigation stack @@ -119,7 +121,7 @@ export class ActionBar extends ActionBarBase { img = fromFileOrResource(this.navigationButton.icon); } - // TODO: This could cause issue when canceling BackEdge gesture - we will change the backIndicator to + // TODO: This could cause issue when canceling BackEdge gesture - we will change the backIndicator to // show the one from the old page but the new page will still be visible (because we canceled EdgeBackSwipe gesutre) // Consider moving this to new method and call it from - navigationControllerDidShowViewControllerAnimated. if (img && img.ios) { @@ -132,7 +134,7 @@ export class ActionBar extends ActionBarBase { navigationBar.backIndicatorTransitionMaskImage = null; } - // Set back button visibility + // Set back button visibility if (this.navigationButton) { navigationItem.setHidesBackButtonAnimated(!isVisible(this.navigationButton), true); }