On previous versions of iOS it was possible to hide the navigation bar separator, using XAML, with the NavigationPage.HideNavigationBarSeparator platform-specific. However, this doesn't work on iOS 13.4.
This issue was previously reported in #10438 and found not to be a problem. After further investigation I can be more precise about the exact issue:
NavigationPage.HideNavigationBarSeparator="true" on both a NavigationPage instance and a ContentPage instance. Neither results in the separator being hidden.Navigation bar separator is hidden by default, and the hide/show buttons work.
The sample as provided:
The sample when ios:NavigationPage.HideNavigationBarSeparator="True" is removed from MyNavigationPage.xaml:
This platform-specific works fine from C#, provided that it's not set from XAML first.
Hello! Thank you for repro!
I honestly don't understand how this works.
Using version 4.6.0.726 of Xamarin.Forms, I'm using Tabbed Page.
I cannot use .MainPage in TabbedPage so I created subclass of NavigationPage:
public class NoBarSeparatorNavigationPage : Xamarin.Forms.NavigationPage {
public NoBarSeparatorNavigationPage(Xamarin.Forms.Page page) : base(page) {
}
protected override void OnAppearing() {
Debug.WriteLine("Hiding navigation bar");
On<iOS>().SetHideNavigationBarSeparator(true);
base.OnAppearing();
}
}
I use it in MainPage.xaml file instead of
I'm using OnAppearing because constructor call to hide separator does not even work.
Fortunately it hides separator, BUT makes background of navigation bar somewhat... grayish?
Edit: this is not because of this. I think it's because I'm using my custom class, it makes it grayish for some reason. Fixed by manually making BackgroundColor = Color.White in constructor
P.S. It does not hide separator for long 馃槩
It would reappear again when switching tabs in Tabbed Page layout.

I hope this may be of help:
No code like:
var bar = NavigationBar;
bar.StandardAppearance.ShadowColor = UIColor.Clear;
bar.StandardAppearance.ShadowImage = new UIImage();
works in ViewDidLoad in custom renderer for NavigationPage, when used in Tabbed Page.
BUT
it works flawlessly in ViewWillAppear method
I am having an identical issue here as well. The only persistent resolution for me was the custom renderer.
@AaronBastian please share your solution, because my tries with custom renderer were unhelpful, since when I changed translucent or background color - separator returned by some code inside Xamarin Forms
@idchlife my solution was as follows:
`
public override void ViewDidLoad()
{
base.ViewDidLoad();
UINavigationBar.Appearance.TintColor = UIColor.White;
}
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
var bar = NavigationBar;
bar.StandardAppearance.ShadowColor = UIColor.Clear;
bar.StandardAppearance.ShadowImage = new UIImage();
}
`
I did NOT keep my changes to the XAML because they were completely ineffective. The renderer was my only solution.
Hey,
I used this temporary fix for 4.5.356 and newer (for those, who found this issue and cannot solve it). It isn't best way to do it, but works.
[assembly: ExportRenderer(typeof(**NavigationPage/CustomNavigationPage**), typeof(NoLineNavigationPageRenderer))]
namespace MyLibrary.iOS.Renderers
{
public class NoLineNavigationPageRenderer : NavigationRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
if (Element is Xamarin.Forms.NavigationPage navigationPage)
{
//iOS older version fix
NavigationBar.SetBackgroundImage(new UIKit.UIImage(), UIKit.UIBarMetrics.Default);
NavigationBar.ShadowImage = new UIKit.UIImage();
NavigationBar.ClipsToBounds = true;
try //Newest iOS version fix - trycatch isn't optimal
{
NavigationBar.ScrollEdgeAppearance.ShadowImage = new UIKit.UIImage();
NavigationBar.ScrollEdgeAppearance.ShadowColor = null;
}
catch (Exception) { }
}
}
}
}
@davidbritch Did it ever work on a ContentPage instance?
I can't see code in the current NavigationRenderer that makes me believe otherwise.
@pauldipietro @jsuarezruiz @samhouts @StephaneDelcroix @davidbritch Hi XF Team, This is on our priority list. Also something visual, but it's a regression that can be seen on most views in our app.