question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Snackbar background color not working on iOS 13.3.1.

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the “Reporting a bug” section on Contributing file?

Current Behavior

Even if you specify the Snackbar’s BackgroundColor, it will not be colored in iOS 13.3.1. Works as expected on iOS 16.3.

Expected Behavior

Even in iOS 13.3.1, if Snackbar’s BackgroundColor is specified, it must be colored.

Steps To Reproduce

Please follow the steps below to reproduce.

  1. Press the Show Snackbar button on MainPage.

iOS 13.3.1 displays a snackbar with a transparent background color.

Link to public reproduction project repository

https://github.com/cat0363/MauiComm-IssueSnackbar.git

Environment

- .NET MAUI CommunityToolkit: 5.1.0
- OS: Windows 11 Build 22621.1555
- .NET MAUI: 7.0.81
- Target Device OS: iOS 13.3.1

Anything else?

I tried to show a snackbar with background color set like below, but the background color doesn’t work on iOS 13.3.1.

// Create Snackbar
var snackbar = Snackbar.Make(
    "This is test message.",
    action: null,
    actionButtonText: string.Empty,
    duration: new TimeSpan(0, 0, 0, 0, 3500),
    visualOptions: new CommunityToolkit.Maui.Core.SnackbarOptions() {
        BackgroundColor = Colors.Red,
        TextColor = Colors.White 
    },
    anchor: null
);

// Display Snackbar
snackbar.Show();

The above code works as intended on Android, but not on iOS 13.3.1.

In iOS 13.3.1, the background color is displayed as transparent, but in iOS 16.3, it is displayed with the specified background color.

[iOS 13.3.1] IMG_0258

[iOS 16.3] IMG_0336

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:15 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
VladislavAntonyukcommented, Jun 12, 2023

I will appreciate if you create a PR. Thank you!

1reaction
cat0363commented, Jun 5, 2023

Hi, @VladislavAntonyuk I’m busy migrating my app from Xamarin.Forms to .NET MAUI, so it would be helpful if someone could take care of this issue. I can investigate and provide information, but I’m sorry that I can’t help you. CornerRadius support isn’t perfect in my code, so I need to do more research. If I find out anything additional, I’ll provide that information in this issue. I’m still fumbling, so I’ll let you know when I can contribute to a bug fix PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

barTintColor not working correctly for large titles iOS 13
I am currently using the following code to display the background color of the navigation bar, which has been working correctly for forever:....
Read more >
How to change snackbar background color in .Net Maui?
Update1: I used the following code and can't reproduce your problem. Because the background color are both white, the text is not visible....
Read more >
Releases 🚀 | Adjust Atlas
Fixed: onColumnResized does not work if accessor is a function in TableV2 component. ... To improve contrast, removed blue background color on selected ......
Read more >
@angular/material | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Untitled
Difference between mouth ulcer and cancer, Staurts store in new lebanon n y, Samsung s7 slow issues? Can just opening an email be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found