You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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);
}
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.
Activity
borrmann commentedon Mar 19, 2026
We have seen this since the introduction of "liquid ass" π support
Ahamed-Ali commentedon Mar 19, 2026
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
dmarjoram commentedon May 21, 2026
Please fix this! β€οΈ
huangshan-ios commentedon Jul 10, 2026
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
isOnstate,mauitrying to update the color again.Something like:
Based on the investigation, I've confirmed the issue happened in that case:
In
SwitchHandler.iOS.cs,MapIsOndoes two things whenIsOnchanges:UpdateIsOn(handler)handler.PlatformView?.UpdateIsOn(view)But
UpdateIsOn(handler)is not updatingIsOndirectly. It forcesTrackColorto update:That means every
ON/OFFstate change re-runsMapTrackColor, which callsUpdateTrackColor. InSwitchExtensions.cs, that method writes intoUISwitch.OnTintColorand the internal track subview background color when the switch is ON, and writes the internal background color whenOFF.My suggested fix direction:
Then remove this helper if unused:
But there is one important follow-up: if MAUI still needs custom
TrackColor, makeUpdateTrackColorapply color only whenTrackColoractually changes, not every timeIsOnchanges. For iOS 26 especially, avoid touchingOnTintColor,ThumbTintColor, or internal subview background during the native toggle animation.Publish reproduction evidence for #34560 on ios
Publish reproduction evidence for #34560 on ios
Publish reproduction evidence for #34560 on ios
Publish reproduction evidence for #34560 on ios
Add dotnet#34560 PR screenshot before-after.png
Add dotnet#34560 PR screenshot before.gif
Add dotnet#34560 PR screenshot after.gif
[iOS] Fix the track of a Switch covering its thumb when it is tapped β¦
[iOS] Fix the track of a Switch covering its thumb when it is tapped β¦