Skip to content

Commit

Permalink
feat(iOS): Update method signature for null
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Oct 28, 2020
1 parent c4eaf68 commit 7811661
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Uno.UI/Controls/CommandBarHelper.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Uno.UI.Controls
{
public static class CommandBarHelper
{
internal static void SetNavigationBar(CommandBar commandBar, UIKit.UINavigationBar navigationBar)
internal static void SetNavigationBar(CommandBar commandBar, UIKit.UINavigationBar? navigationBar)
{
commandBar.GetRenderer(() => new CommandBarRenderer(commandBar)).Native = navigationBar ?? throw new ArgumentNullException(nameof(navigationBar));
}
Expand All @@ -30,7 +30,7 @@ public static void PageCreated(UIViewController pageController)
if (topCommandBar == null)
{
// The default CommandBar style contains information that might be relevant to all pages, including those without a CommandBar.
// For example the Uno.UI.Toolkit.CommandBarExtensions.BackButtonTitle attached property is often set globally to "" through
// For example the Uno.UI.Toolkit.CommandBarExtensions.BackButtonTitle attached property is often set globally to "" through
// a default CommandBar style in order to remove the back button text throughout an entire application.
// In order to leverage this information, we create a new CommandBar instance that only exists to "render" the NavigationItem.
topCommandBar = new CommandBar();
Expand Down Expand Up @@ -97,7 +97,7 @@ public static void PageDidDisappear(UIViewController pageController)
if (pageController.FindTopCommandBar() is { } topCommandBar)
{
// Set the native navigation bar to null so it does not render when the page is not visible
SetNavigationBar(topCommandBar, null!);
SetNavigationBar(topCommandBar, null);
}
}

Expand All @@ -106,7 +106,7 @@ public static void PageWillDisappear(UIViewController pageController)
if (pageController.FindTopCommandBar() is { } topCommandBar)
{
// Set the native navigation bar to null so it does not render when the page is not visible
SetNavigationBar(topCommandBar, null!);
SetNavigationBar(topCommandBar, null);
}
}

Expand Down

0 comments on commit 7811661

Please sign in to comment.