Disable background color for WKInterfaceSwitch

When I use WKInterfaceSwitch, watchOS draws a translucent background behind the entire control. I do not want this background to appear, but I could not find ways to hide or disable it.

Is it possible?

+9
watch-os-2 apple-watch wkinterfaceswitch
source share
1 answer

I also cannot find a way to completely disable it, but if you put a switch in a group and set the background color of the group, you can change the color. It still has a touch of overlay on it, but I think it's better than nothing

You may have problems with the radius of the corner. You just need to set the angular radius of the group to 6.0, which is the default value for the group https://developer.apple.com/documentation/watchkit/wkinterfacegroup/1619667-setcornerradius?language=objc

[self.groupSwitchHolder setCornerRadius:6.0]; 
0
source share

All Articles