@@ -23,8 +23,7 @@ let navDepth = -1;
2323export class Frame extends FrameBase {
2424 public viewController : UINavigationControllerImpl ;
2525 public _animatedDelegate = < UINavigationControllerDelegate > UINavigationControllerAnimatedDelegate . new ( ) ;
26-
27- private _ios : iOSFrame ;
26+ public _ios : iOSFrame ;
2827
2928 constructor ( ) {
3029 super ( ) ;
@@ -219,20 +218,20 @@ export class Frame extends FrameBase {
219218 switch ( this . _ios . navBarVisibility ) {
220219 case "always" :
221220 return true ;
222-
221+
223222 case "never" :
224223 return false ;
225-
224+
226225 case "auto" :
227226 let newValue : boolean ;
228-
227+
229228 if ( page && page . actionBarHidden !== undefined ) {
230229 newValue = ! page . actionBarHidden ;
231230 }
232231 else {
233232 newValue = this . ios . controller . viewControllers . count > 1 || ( page && page . actionBar && ! page . actionBar . _isEmpty ( ) ) ;
234233 }
235-
234+
236235 newValue = ! ! newValue ; // Make sure it is boolean
237236 return newValue ;
238237 }
@@ -390,6 +389,9 @@ class UINavigationControllerImpl extends UINavigationController {
390389 const owner = this . _owner . get ( ) ;
391390 if ( owner && owner . isLoaded && ! owner . parent && ! this . presentedViewController ) {
392391 owner . callUnloaded ( ) ;
392+
393+ owner . viewController = null ;
394+ owner . ios . controller = null ;
393395 }
394396 }
395397
@@ -596,6 +598,9 @@ class iOSFrame implements iOSFrameDefinition {
596598 public get controller ( ) {
597599 return this . _controller ;
598600 }
601+ public set controller ( value : UINavigationControllerImpl ) {
602+ this . _controller = value ;
603+ }
599604
600605 public get showNavigationBar ( ) : boolean {
601606 return this . _showNavigationBar ;
0 commit comments