Closed uday-lucky closed 4 years ago
duplicate #6298
The workaround for the duplicate only affects the actual navbar and does not affect the top tab bar which the shell creates
I managed to fix it by creating a custom AppShellRenderer
using System;
using YourApp;
using YourApp.iOS.Renderers;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(AppShell), typeof(MyShellRenderer))]
namespace YourApp.iOS.Renderers
{
public class TabbarAppearanceTracker : ShellTabBarAppearanceTracker
{
public override void SetAppearance(UITabBarController controller, ShellAppearance appearance)
{
controller.TabBar.Translucent = false;
base.SetAppearance(controller, appearance);
}
}
public class MyShellRenderer:ShellRenderer
{
protected override IShellTabBarAppearanceTracker CreateTabBarAppearanceTracker()
{
return new TabbarAppearanceTracker();
}
}
}
@samhouts I still have this issue in iOS using xamarin forms 4.6 - is this expected and going to be in a future release or should I raise another issue?
Description
1.Navigationbar color & also the tabs background color is very light , when compared to the original color(#132241). It is fine in android . When i deploy in IOS, the color is very light and not matching the original.
Steps to Reproduce
Download xaminals sample project from https://docs.microsoft.com/en-gb/samples/xamarin/xamarin-forms-samples/userinterface-xaminals/
Replace "Shell.BackgroundColor" with "#132241" in "DomesticShell" style (AppShell.Xaml) as shown below.
<Style x:Key="DomesticShell" TargetType="Element" BasedOn="{StaticResource BaseStyle}"> <Setter Property="Shell.BackgroundColor" Value="#132241" />
Expected Behavior
Same as the colour in android device
Actual Behavior
Difference in both platforms;
Basic Information
Screenshots
Reproduction Link
Workaround
I tried adding the following line in appdelegate.cs
succeeded in getting the navigationbar color and bottom tab background color , but the top tabbed page background color still appears different from original color. Please find below screenshot for reference.