Skip to content

Switch iOS Liquid glass rendering issueΒ #34560

Open

Description

@Michal-MK

Description

2026-03-19.10-38-28.mp4

Same artefacts can be seen e.g. here #33496

The native control in iOS directly renders fine. So it has to be something with MAUI's rendering process?

Only happens on the "IsToggled == true" side. Which is interesting.

Steps to Reproduce

Blank project place a switch control anywhere and run on iOS 26.x

Link to public reproduction project repository

https://github.com/dotnet/maui-samples

Version with bug

10.0.50

Is this a regression from previous behavior?

Probably since the introduction of Liquid ass support?

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 26.x

Did you find any workaround?

Nope. We are using Cupertino switches :/

Activity

  1. borrmann commented on Mar 19, 2026

    @borrmann
    Contributor

    We have seen this since the introduction of "liquid ass" πŸ˜‚ support

  2. Ahamed-Ali commented on Mar 19, 2026

    @Ahamed-Ali
    Contributor

    This issue has been validated in Visual Studio Code 1.112.0 with .NET MAUI 10.0.0 and 10.0.50. It was reproducible on iOS 26 platform comparing with the iOS native project.

    SwitchiOS26.zip

    Native

    SwitchNative.mov

    Maui

    SwitchMaui.mov
  3. added this to the Backlog milestone on Mar 19, 2026
  4. dmarjoram commented on May 21, 2026

    @dmarjoram

    Please fix this! ❀️

    Image
  5. huangshan-ios commented on Jul 10, 2026

    @huangshan-ios

    Hey Guys,
    iOS dev here. I've been fixing an issue related to this on Native iOS.

    The issue here, I believe, is that when we're updating the isOn state, maui trying to update the color again.

    Something like:

    • set isOn -> isOn changed -> update color (thumbTintColor, tintColor, onTintColor)

    Based on the investigation, I've confirmed the issue happened in that case:
    In SwitchHandler.iOS.cs, MapIsOn does two things when IsOn changes:

    1. Calls UpdateIsOn(handler)
    2. Then calls handler.PlatformView?.UpdateIsOn(view)

    But UpdateIsOn(handler) is not updating IsOn directly. It forces TrackColor to update:

    static void UpdateIsOn(ISwitchHandler handler)
    {
        handler.UpdateValue(nameof(ISwitch.TrackColor));
    }
    

    That means every ON/OFF state change re-runs MapTrackColor, which calls UpdateTrackColor. In SwitchExtensions.cs, that method writes into UISwitch.OnTintColor and the internal track subview background color when the switch is ON, and writes the internal background color when OFF.


    My suggested fix direction:

    public static void MapIsOn(ISwitchHandler handler, ISwitch view)
    {
        handler.PlatformView?.UpdateIsOn(view);
    }
    

    Then remove this helper if unused:

    static void UpdateIsOn(ISwitchHandler handler)
    {
        handler.UpdateValue(nameof(ISwitch.TrackColor));
    }
    

    But there is one important follow-up: if MAUI still needs custom TrackColor, make UpdateTrackColor apply color only when TrackColor actually changes, not every time IsOn changes. For iOS 26 especially, avoid touching OnTintColor, ThumbTintColor, or internal subview background during the native toggle animation.

  6. added 3 commits that reference this issue on Nov 12, 2026
  7. added 2 commits that reference this issue on Nov 13, 2026
    7a2fbc1
    c5d73b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions