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

[Bug] iOS NavigationBar background flickering on navigation #9943

Closed
beeradmoore opened this issue Mar 12, 2020 · 11 comments · Fixed by #12835
Closed

[Bug] iOS NavigationBar background flickering on navigation #9943

beeradmoore opened this issue Mar 12, 2020 · 11 comments · Fixed by #12835
Assignees
Labels
4.5.0 regression on 4.5.0 a/navbar blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/3 🕒 3 i/regression in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛

Comments

@beeradmoore
Copy link
Contributor

beeradmoore commented Mar 12, 2020

Description

On iOS, the navigation bar of a navigation page will ficker when navigating. Additionally the default NaigationPage BarBackgroundColor on iOS appears different.
This only happens if the BarBackgroundColor of the NavigationPage has not been set.

I have not tested, but I believe this to have come from this commit 271e41c#diff-efa21a065745b4e261efc4bf6a5d8784R641-R643 (same for #9456)

Steps to Reproduce

From source:

  1. Create a NavigationPage with a ContentPage in it.
  2. Add some method to push another ContentPage onto the navigation stack.
  3. Observe the flickering (tested on iPhone 11, iOS 13.3 simulator)

From repro:

  1. Open project
  2. Click "PushAsync"
  3. Observe the flickering (tested on iPhone 11, iOS 13.3 simulator)

Expected Behavior

Navigation bar appears the same throughout navigation.

Actual Behavior

Navigation bar flickers to other colours throughout navigation. This could be translucancy changing?

Basic Information

  • Version with issue: 4.5.0.356, 4.6.0.379-pre1, (EDIT: 4.6.0.772)
  • Last known good version: 4.4.0.991757
  • IDE: Visual Studio Community 2019 for Mac, Version 8.4.8 (build 2)
  • Platform Target Frameworks:
    • iOS: 11.3.1
  • Nuget Packages: Xamarin.Forms

Screenshots

Xamarin.Froms 4.4.0.991757
nav_xf_4 4 0 991757

Xamarin.Forms 4.5.0.356
nav_xf_4 5 0 356

I think the gifs may be hard to see the issue, so I am also attaching the direct mp4 screen recordings.

nav_flicker.zip

Reproduction Link

Project is called MasterDetailPageNavColorTest because I originally thought this was a MasterDetailPage issue.
MasterDetailPageNavColorTest.zip

Workaround

Setting a BarBackgroundColor of the NavigaitonPage fixes this issue.

@beeradmoore beeradmoore added s/unverified New report that has yet to be verified t/bug 🐛 labels Mar 12, 2020
@jfversluis
Copy link
Member

I can see this happening. It seems like it's pushed opaque and then decides to be translucent or something.

With the 4.4 version it doesn't happen but the bar always seems opaque. I think there is a platform specific for setting that as well. So that might be another workaround.

Thanks for the report and the investigation @beeradmoore that will surely help!

@jfversluis jfversluis added a/navbar i/regression p/iOS 🍎 and removed s/unverified New report that has yet to be verified labels Mar 16, 2020
@jfversluis
Copy link
Member

@beeradmoore just seeing this come in #9972
Does that help in this issue as well?

@beeradmoore
Copy link
Contributor Author

@beeradmoore just seeing this come in #9972
Does that help in this issue as well?

That is a duplicate of #9456 I think. And it’s when investigating a fix for 9456 I found this issue we’re looking at.

@jfversluis
Copy link
Member

Wait. I meant the PR I'm linking to :) which also seems to do something with the code that you identify as the culprit for this. Is it possible that PR will also fix this issue?

@beeradmoore
Copy link
Contributor Author

Ah sorry, I shouldn’t github before coffee 😂

I am not sure, their samples work but they have changed the nav bar background color, and that stops the issue happening. I’d need to grab their PR locally and double check with default colours.

@michaeldimoudis
Copy link

Hi any update on this issue? Not fixed on latest stable 4.6 in my use case, and none of the workarounds work for me. As a result I can not upgrade from 4.4 to 4.5 or 4.6.

@ghost
Copy link

ghost commented May 11, 2020

I agree with @michaeldimoudis : this issue (as well as #9456) makes it impossible for us to update from 4.4. to anything newer. Any update on this issue?

@beeradmoore
Copy link
Contributor Author

This is still an issue on XF 4.6.0.772.

@samhouts samhouts added the 4.5.0 regression on 4.5.0 label Jun 17, 2020
@samhouts samhouts added this to the 4.5.0 milestone Jun 17, 2020
@samhouts samhouts removed this from the 4.5.0 milestone Jul 8, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@Tommigun1980
Copy link

Hello. I was working with a design that would require usage of a transparent navigation bar. But it doesn't work properly as it flashes. I would really not like to change the designs in my app completely at the mercy of bugs, so is there any chance this could get fixed, or does anyone have a workaround? I don't have time to play detective all the time to try find workaround for everything so here's hoping for advice on how to prevent the flash, or a fix.

Thanks a lot!

@Tommigun1980
Copy link

Hello. Do you think this will get fixed?

Thanks.

@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@jsuarezruiz jsuarezruiz added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Nov 10, 2020
@jsuarezruiz jsuarezruiz self-assigned this Nov 13, 2020
@jsuarezruiz
Copy link
Contributor

Created PR with the fix of this issue: #12835

@jsuarezruiz jsuarezruiz added the in-progress This issue has an associated pull request that may resolve it! label Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.5.0 regression on 4.5.0 a/navbar blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/3 🕒 3 i/regression in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants