@@ -46,15 +46,9 @@ export function reloadPage(): void {
4646
4747export class Frame extends FrameBase {
4848 public viewController : UINavigationControllerImpl ;
49- private _ios : iOSFrame ;
5049 public _animatedDelegate = < UINavigationControllerDelegate > UINavigationControllerAnimatedDelegate . new ( ) ;
5150
52- public _shouldSkipNativePop : boolean = false ;
53- public _navigateToEntry : BackstackEntry ;
54- public _widthMeasureSpec : number ;
55- public _heightMeasureSpec : number ;
56- public _right : number ;
57- public _bottom : number ;
51+ private _ios : iOSFrame ;
5852
5953 constructor ( ) {
6054 super ( ) ;
@@ -173,19 +167,17 @@ export class Frame extends FrameBase {
173167
174168 public _goBackCore ( backstackEntry : BackstackEntry ) {
175169 super . _goBackCore ( backstackEntry ) ;
176-
177170 navDepth = backstackEntry [ NAV_DEPTH ] ;
178171
179- if ( ! this . _shouldSkipNativePop ) {
180- let controller = backstackEntry . resolvedPage . ios ;
181- let animated = this . _currentEntry ? this . _getIsAnimatedNavigation ( this . _currentEntry . entry ) : false ;
172+ let controller = backstackEntry . resolvedPage . ios ;
173+ let animated = this . _currentEntry ? this . _getIsAnimatedNavigation ( this . _currentEntry . entry ) : false ;
182174
183- this . _updateActionBar ( backstackEntry . resolvedPage ) ;
184- if ( traceEnabled ( ) ) {
185- traceWrite ( `${ this } .popToViewControllerAnimated(${ controller } , ${ animated } ); depth = ${ navDepth } ` , traceCategories . Navigation ) ;
186- }
187- this . _ios . controller . popToViewControllerAnimated ( controller , animated ) ;
175+ this . _updateActionBar ( backstackEntry . resolvedPage ) ;
176+ if ( traceEnabled ( ) ) {
177+ traceWrite ( `${ this } .popToViewControllerAnimated(${ controller } , ${ animated } ); depth = ${ navDepth } ` , traceCategories . Navigation ) ;
188178 }
179+
180+ this . _ios . controller . popToViewControllerAnimated ( controller , animated ) ;
189181 }
190182
191183 public _updateActionBar ( page ?: Page , disableNavBarAnimation : boolean = false ) : void {
@@ -377,11 +369,20 @@ class UINavigationControllerImpl extends UINavigationController {
377369 public viewWillAppear ( animated : boolean ) : void {
378370 super . viewWillAppear ( animated ) ;
379371 const owner = this . _owner . get ( ) ;
380- if ( owner && ( ! owner . isLoaded && ! owner . parent ) ) {
372+ if ( owner && ! owner . isLoaded && ! owner . parent ) {
381373 owner . callLoaded ( ) ;
382374 }
383375 }
384376
377+ @profile
378+ public viewDidDisappear ( animated : boolean ) : void {
379+ super . viewDidDisappear ( animated ) ;
380+ const owner = this . _owner . get ( ) ;
381+ if ( owner && owner . isLoaded && ! owner . parent && ! this . presentedViewController ) {
382+ owner . callUnloaded ( ) ;
383+ }
384+ }
385+
385386 private animateWithDuration ( navigationTransition : NavigationTransition ,
386387 nativeTransition : UIViewAnimationTransition ,
387388 transitionType : string ,
0 commit comments