Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] UINavigationBar.Appearance.BarTintColor not set #14015

Open
SandraHicks opened this issue Mar 15, 2021 · 3 comments
Open

[Bug] UINavigationBar.Appearance.BarTintColor not set #14015

SandraHicks opened this issue Mar 15, 2021 · 3 comments

Comments

@SandraHicks
Copy link

Description

After upgrading Xamarin.Forms from 4.8.0.1364 to 5.0.0.2012, I cannot set the UINavigationBar.Appearance.BarTintColor in my AppDelegate.cs FinishedLaunching Method. Any attempt is ignored.

Ususally, I set it from an image after loading the Application:

global::Xamarin.Forms.Forms.Init();

Forms9Patch.iOS.Settings.Initialize(this);

LoadApplication(new App((int)(UIScreen.MainScreen.Bounds.Height), (int)(UIScreen.MainScreen.Bounds.Width), fromPush));

var image = UIImage.FromFile("toolbar_image.png");
                if (image != null)
                    UINavigationBar.Appearance.BarTintColor = UIColor.FromPatternImage(image);

Nevertheless, even setting a color is ignored, it just stays white as the background:

UINavigationBar.Appearance.BarTintColor = UIColor.Blue;

There is no other place in my code where I set it for iOS.

Does anyone else encounter this issue? Is there any workaround? I cannot stay on 4.8 much longer.

Steps to Reproduce

  1. Try to set the UINavigationBar.Appearance.BarTintColor in AppDelegate FinishedLaunching

Expected Behavior

Color is set (or image is displayed)

Actual Behavior

Just the background white is showing

Basic Information

  • Version with issue: 5.0.0.2012
  • Last known good version: 4.8.0.1364
  • Platform Target Frameworks:
    • iOS: Version: 14.14.2.5
    • Android: Version: 11.2.0.21
    • UWP: none
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices: iPhone 6s

Environment

Show/Hide Visual Studio info
Visual Studio Community 2019 for Mac
Version 8.9.1 (build 34)

Mono Framework MDK
Runtime:
	Mono 6.12.0.122 (2020-02/c621c35ffa0) (64-bit)
	Package version: 612000122

Roslyn (Language Service)
3.9.0-6.21152.10+c10f884b30737542ddd84ca889a4aad9281ce210

NuGet
Version: 5.8.0.6860

Build Logs

@SandraHicks SandraHicks added s/unverified New report that has yet to be verified t/bug 🐛 labels Mar 15, 2021
@joanneraye
Copy link

I am having the same problem. Affected iPhone 8.

@jsuarezruiz jsuarezruiz added this to New in Triage via automation Mar 22, 2021
@jsuarezruiz jsuarezruiz moved this from New to Ready For Work in Triage Mar 23, 2021
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Mar 23, 2021
@antiGithub
Copy link

antiGithub commented Apr 12, 2021

Same problem (background white) with iPhone 6s iOS 14.4 and Xamarin.Forms 5.0.0.2012

If Running on Device in Win VS2019 via attached iPhone on connected mac then background color will be black?

@SandraHicks
Copy link
Author

Any progress on this yet? Or a known workaround?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Triage
  
Ready For Work
Development

No branches or pull requests

4 participants