File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1918,7 +1918,13 @@ class Container : UIView
19181918
19191919 public Container ( View view , UINavigationBar bar ) : base ( bar . Bounds )
19201920 {
1921- if ( OperatingSystem . IsIOSVersionAtLeast ( 11 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 11 ) )
1921+ // For iOS 26+, we need to use autoresizing masks instead of constraints to ensure proper TitleView display
1922+ if ( OperatingSystem . IsIOSVersionAtLeast ( 26 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 26 ) )
1923+ {
1924+ TranslatesAutoresizingMaskIntoConstraints = true ;
1925+ AutoresizingMask = UIViewAutoresizing . FlexibleHeight | UIViewAutoresizing . FlexibleWidth ;
1926+ }
1927+ else if ( OperatingSystem . IsIOSVersionAtLeast ( 11 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 11 ) )
19221928 {
19231929 TranslatesAutoresizingMaskIntoConstraints = false ;
19241930 }
@@ -2007,7 +2013,9 @@ public override CGRect Frame
20072013 {
20082014 if ( Superview != null )
20092015 {
2010- if ( ! ( OperatingSystem . IsIOSVersionAtLeast ( 11 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 11 ) ) )
2016+ // For iOS 26+ and pre-iOS 11, we use autoresizing masks and need to adjust the frame manually
2017+ if ( OperatingSystem . IsIOSVersionAtLeast ( 26 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 26 ) ||
2018+ ! ( OperatingSystem . IsIOSVersionAtLeast ( 11 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 11 ) ) )
20112019 {
20122020 value . Y = Superview . Bounds . Y ;
20132021
You can’t perform that action at this time.
0 commit comments