MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / _updateActionBar

Method _updateActionBar

packages/core/ui/frame/index.ios.ts:272–302  ·  view source on GitHub ↗
(page?: Page, disableNavBarAnimation = false)

Source from the content-addressed store, hash-verified

270 }
271
272 public _updateActionBar(page?: Page, disableNavBarAnimation = false): void {
273 super._updateActionBar(page);
274
275 if (!this._ios || (page && this.currentPage && this.currentPage.modal === page)) {
276 return;
277 }
278
279 page = page || this.currentPage;
280 const newValue = this._getNavBarVisible(page);
281 const disableNavBarAnimationCache = this._ios._disableNavBarAnimation;
282
283 if (disableNavBarAnimation) {
284 this._ios._disableNavBarAnimation = true;
285 }
286
287 // when showing/hiding navigationbar, the page needs a relayout to avoid overlapping or hidden layouts
288 const needsPageLayout = this._ios.showNavigationBar !== newValue;
289 this._ios.showNavigationBar = newValue;
290
291 if (disableNavBarAnimation) {
292 this._ios._disableNavBarAnimation = disableNavBarAnimationCache;
293 }
294
295 if (this._ios.controller?.navigationBar) {
296 this._ios.controller.navigationBar.userInteractionEnabled = this.navigationQueueIsEmpty();
297 }
298
299 if (needsPageLayout && page) {
300 page.requestLayout();
301 }
302 }
303
304 public _getNavBarVisible(page: Page): boolean {
305 switch (this.actionBarVisibility) {

Callers 5

_navigateCoreMethod · 0.95
_goBackCoreMethod · 0.95
viewWillAppearMethod · 0.45

Calls 3

_getNavBarVisibleMethod · 0.95
requestLayoutMethod · 0.45

Tested by

no test coverage detected