Skip to content

Commit

Permalink
Disable NSToolbar Tabs (#25137) (#25700)
Browse files Browse the repository at this point in the history
* Disable NSToolbar Tabs

* - fix OS check

* - fix tabbedview extentions PR

* - bump targets

* - add missing file

* - add if/def for NET18.0 target

* - add catalyst check

* - switch to newer APIs for iOS and catalyst 18+

* - if/def for iOS18
# Conflicts:
#	src/Core/src/Platform/iOS/TabbedViewExtensions.cs
  • Loading branch information
PureWeen authored Nov 7, 2024
1 parent 6f1322b commit bd61427
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,14 @@ void UpdateTabBarHidden()
if (ShellItemController == null)
return;

TabBar.Hidden = !ShellItemController.ShowTabs;
if (OperatingSystemMacCatalyst18Workaround.IsMacCatalystVersionAtLeast18() || OperatingSystem.IsIOSVersionAtLeast(18))
{
TabBarHidden = !ShellItemController.ShowTabs;
}
else
{
TabBar.Hidden = !ShellItemController.ShowTabs;
}
}
}
}
2 changes: 0 additions & 2 deletions src/Core/src/Platform/iOS/TabbedViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ internal static void DisableiOS18ToolbarTabs(this UITabBarController tabBarContr
{
tabBarController.TraitOverrides.HorizontalSizeClass = UIUserInterfaceSizeClass.Compact;
tabBarController.Mode = UITabBarControllerMode.TabSidebar;
tabBarController.Sidebar.Hidden = true;
tabBarController.TabBarHidden = true;
}
else if (OperatingSystem.IsIOSVersionAtLeast(18, 0) && UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
{
Expand Down

0 comments on commit bd61427

Please sign in to comment.