(backstackEntry: BackstackEntry)
| 112 | // !!! BECAUSE THE PARAMETER TYPE IS EVALUATED WITH TYPEOF |
| 113 | @profile |
| 114 | public _navigateCore(backstackEntry: BackstackEntry) { |
| 115 | super._navigateCore(backstackEntry); |
| 116 | |
| 117 | const viewController: UIViewController = backstackEntry.resolvedPage.ios; |
| 118 | if (!viewController) { |
| 119 | throw new Error('Required page does not have a viewController created.'); |
| 120 | } |
| 121 | |
| 122 | const clearHistory = backstackEntry.entry.clearHistory; |
| 123 | if (clearHistory) { |
| 124 | navDepth = -1; |
| 125 | } |
| 126 | |
| 127 | const isReplace = this._executingContext && this._executingContext.navigationType === NavigationType.replace; |
| 128 | if (!isReplace) { |
| 129 | navDepth++; |
| 130 | } |
| 131 | |
| 132 | let navigationTransition: NavigationTransition; |
| 133 | const animated = this.currentPage ? this._getIsAnimatedNavigation(backstackEntry.entry) : false; |
| 134 | if (animated) { |
| 135 | navigationTransition = this._getNavigationTransition(backstackEntry.entry); |
| 136 | if (navigationTransition) { |
| 137 | viewController[TRANSITION] = navigationTransition; |
| 138 | } |
| 139 | } else { |
| 140 | //https://github.com/NativeScript/NativeScript/issues/1787 |
| 141 | viewController[TRANSITION] = { name: NON_ANIMATED_TRANSITION }; |
| 142 | } |
| 143 | |
| 144 | if (!navControllerDelegate) { |
| 145 | navControllerDelegate = UINavigationControllerDelegateImpl.new(); |
| 146 | } |
| 147 | |
| 148 | this._ios.controller.delegate = navControllerDelegate; |
| 149 | viewController[DELEGATE] = navControllerDelegate; |
| 150 | |
| 151 | const nativeTransition = _getNativeTransition(navigationTransition, true, this.direction); |
| 152 | if (!nativeTransition && navigationTransition) { |
| 153 | if (navigationTransition.instance) { |
| 154 | this.transitionId = navigationTransition.instance.id; |
| 155 | const transitionState = SharedTransition.getState(this.transitionId); |
| 156 | if (transitionState?.interactive?.dismiss) { |
| 157 | // interactive transitions via gestures |
| 158 | // TODO - allow users to define their own custom gesture dismissals |
| 159 | navigationTransition.instance.setupInteractiveGesture(() => { |
| 160 | this._ios.controller.popViewControllerAnimated(true); |
| 161 | }, this); |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | backstackEntry[NAV_DEPTH] = navDepth; |
| 167 | viewController[ENTRY] = backstackEntry; |
| 168 | |
| 169 | if (!animated && SDK_VERSION > 10) { |
| 170 | // Reset back button title before pushing view controller to prevent |
| 171 | // displaying default 'back' title (when NavigaitonButton custom title is set). |
nothing calls this directly
no test coverage detected