@@ -7,13 +7,12 @@ import { LinearGradient } from '../styling/linear-gradient';
77import  {  colorProperty ,  backgroundInternalProperty ,  backgroundColorProperty ,  backgroundImageProperty  }  from  '../styling/style-properties' ; 
88import  {  ios  as  iosViewUtils  }  from  '../utils' ; 
99import  {  ImageSource  }  from  '../../image-source' ; 
10- import  {  layout ,  iOSNativeHelper ,   isFontIconURI  }  from  '../../utils' ; 
10+ import  {  layout ,  isFontIconURI  }  from  '../../utils' ; 
1111import  {  SDK_VERSION  }  from  '../../utils/constants' ; 
1212import  {  accessibilityHintProperty ,  accessibilityLabelProperty ,  accessibilityLanguageProperty ,  accessibilityValueProperty  }  from  '../../accessibility/accessibility-properties' ; 
1313
1414export  *  from  './action-bar-common' ; 
1515
16- const  majorVersion  =  iOSNativeHelper . MajorVersion ; 
1716const  UNSPECIFIED  =  layout . makeMeasureSpec ( 0 ,  layout . UNSPECIFIED ) ; 
1817
1918interface  NSUINavigationBar  extends  UINavigationBar  { 
@@ -271,7 +270,7 @@ export class ActionBar extends ActionBarBase {
271270		// show the one from the old page but the new page will still be visible (because we canceled EdgeBackSwipe gesutre) 
272271		// Consider moving this to new method and call it from - navigationControllerDidShowViewControllerAnimated. 
273272		const  image  =  img  ? img . imageWithRenderingMode ( UIImageRenderingMode . AlwaysOriginal )  : null ; 
274- 		if  ( majorVersion  >=  15 )  { 
273+ 		if  ( SDK_VERSION  >=  15 )  { 
275274			const  appearance  =  this . _getAppearance ( navigationBar ) ; 
276275			appearance . setBackIndicatorImageTransitionMaskImage ( image ,  image ) ; 
277276			this . _updateAppearance ( navigationBar ,  appearance ) ; 
@@ -304,6 +303,9 @@ export class ActionBar extends ActionBarBase {
304303		navigationItem . accessibilityLabel  =  this . accessibilityLabel ; 
305304		navigationItem . accessibilityLanguage  =  this . accessibilityLanguage ; 
306305		navigationItem . accessibilityHint  =  this . accessibilityHint ; 
306+ 
307+ 		// Configure large title support for this navigation item 
308+ 		this . checkLargeTitleSupport ( navigationItem ) ; 
307309	} 
308310
309311	private  populateMenuItems ( navigationItem : UINavigationItem )  { 
@@ -378,7 +380,7 @@ export class ActionBar extends ActionBarBase {
378380		} 
379381		if  ( color )  { 
380382			const  titleTextColor  =  NSDictionary . dictionaryWithObjectForKey ( color . ios ,  NSForegroundColorAttributeName ) ; 
381- 			if  ( majorVersion  >=  15 )  { 
383+ 			if  ( SDK_VERSION  >=  15 )  { 
382384				const  appearance  =  this . _getAppearance ( navBar ) ; 
383385				appearance . titleTextAttributes  =  titleTextColor ; 
384386			} 
@@ -398,7 +400,7 @@ export class ActionBar extends ActionBarBase {
398400		} 
399401
400402		const  nativeColor  =  color  instanceof  Color  ? color . ios  : color ; 
401- 		if  ( __VISIONOS__  ||  majorVersion  >=  15 )  { 
403+ 		if  ( __VISIONOS__  ||  SDK_VERSION  >=  15 )  { 
402404			const  appearance  =  this . _getAppearance ( navBar ) ; 
403405			// appearance.configureWithOpaqueBackground(); 
404406			appearance . backgroundColor  =  nativeColor ; 
@@ -416,7 +418,7 @@ export class ActionBar extends ActionBarBase {
416418
417419		let  color : UIColor ; 
418420
419- 		if  ( __VISIONOS__  ||  majorVersion  >=  15 )  { 
421+ 		if  ( __VISIONOS__  ||  SDK_VERSION  >=  15 )  { 
420422			const  appearance  =  this . _getAppearance ( navBar ) ; 
421423			color  =  appearance . backgroundColor ; 
422424		}  else  { 
@@ -432,7 +434,7 @@ export class ActionBar extends ActionBarBase {
432434			return ; 
433435		} 
434436
435- 		if  ( __VISIONOS__  ||  majorVersion  >=  15 )  { 
437+ 		if  ( __VISIONOS__  ||  SDK_VERSION  >=  15 )  { 
436438			const  appearance  =  this . _getAppearance ( navBar ) ; 
437439			// appearance.configureWithOpaqueBackground(); 
438440			appearance . backgroundImage  =  image ; 
@@ -456,7 +458,7 @@ export class ActionBar extends ActionBarBase {
456458
457459		let  image : UIImage ; 
458460
459- 		if  ( __VISIONOS__  ||  majorVersion  >=  15 )  { 
461+ 		if  ( __VISIONOS__  ||  SDK_VERSION  >=  15 )  { 
460462			const  appearance  =  this . _getAppearance ( navBar ) ; 
461463			image  =  appearance . backgroundImage ; 
462464		}  else  { 
@@ -507,6 +509,8 @@ export class ActionBar extends ActionBarBase {
507509			return ; 
508510		} 
509511
512+ 		console . log ( 'ActionBar._onTitlePropertyChanged' ,  this . title ) ; 
513+ 
510514		if  ( page . frame )  { 
511515			page . frame . _updateActionBar ( page ) ; 
512516		} 
@@ -517,7 +521,7 @@ export class ActionBar extends ActionBarBase {
517521
518522	private  updateFlatness ( navBar : UINavigationBar )  { 
519523		if  ( this . flat )  { 
520- 			if  ( majorVersion  >=  15 )  { 
524+ 			if  ( SDK_VERSION  >=  15 )  { 
521525				const  appearance  =  this . _getAppearance ( navBar ) ; 
522526				appearance . shadowColor  =  UIColor . clearColor ; 
523527				this . _updateAppearance ( navBar ,  appearance ) ; 
@@ -530,7 +534,7 @@ export class ActionBar extends ActionBarBase {
530534				navBar . translucent  =  false ; 
531535			} 
532536		}  else  { 
533- 			if  ( majorVersion  >=  15 )  { 
537+ 			if  ( SDK_VERSION  >=  15 )  { 
534538				if  ( navBar . standardAppearance )  { 
535539					// Not flat and never been set do nothing. 
536540					const  appearance  =  navBar . standardAppearance ; 
@@ -581,7 +585,7 @@ export class ActionBar extends ActionBarBase {
581585	public  onLayout ( left : number ,  top : number ,  right : number ,  bottom : number )  { 
582586		const  titleView  =  this . titleView ; 
583587		if  ( titleView )  { 
584- 			if  ( majorVersion  >  10 )  { 
588+ 			if  ( SDK_VERSION  >  10 )  { 
585589				// On iOS 11 titleView is wrapped in another view that is centered with constraints. 
586590				View . layoutChild ( this ,  titleView ,  0 ,  0 ,  titleView . getMeasuredWidth ( ) ,  titleView . getMeasuredHeight ( ) ) ; 
587591			}  else  { 
@@ -670,4 +674,26 @@ export class ActionBar extends ActionBarBase {
670674			this . navBar . prefersLargeTitles  =  value ; 
671675		} 
672676	} 
677+ 
678+ 	private  checkLargeTitleSupport ( navigationItem : UINavigationItem )  { 
679+ 		const  navBar  =  this . navBar ; 
680+ 		if  ( ! navBar )  { 
681+ 			return ; 
682+ 		} 
683+ 		// Configure large title display mode only when not using a custom titleView 
684+ 		if  ( SDK_VERSION  >=  11 )  { 
685+ 			if  ( this . iosLargeTitle )  { 
686+ 				// Always show large title for this navigation item when large titles are enabled 
687+ 				navigationItem . largeTitleDisplayMode  =  UINavigationItemLargeTitleDisplayMode . Always ; 
688+ 			}  else  { 
689+ 				if  ( SDK_VERSION  >=  26 )  { 
690+ 					// Explicitly disable large titles for this navigation item 
691+ 					// Due to overlapping title issue in iOS 26 
692+ 					navigationItem . largeTitleDisplayMode  =  UINavigationItemLargeTitleDisplayMode . Never ; 
693+ 				}  else  { 
694+ 					navigationItem . largeTitleDisplayMode  =  UINavigationItemLargeTitleDisplayMode . Automatic ; 
695+ 				} 
696+ 			} 
697+ 		} 
698+ 	} 
673699} 
0 commit comments