0

I have been following multiple examples on the internet regarding the customization of the new UIControlSegment from iOS 13 but none of them are explaining how to set its background color transparent. I have a very soft gradient in my app and I cannot set it to transparent anymore. I have tried to apply a layer to try to fix it but no success, the whole component is getting trimmed or it's affecting superior layers.

All examples on the internet are basically the same, with white background or black. This is not nice when you are giving maintenance in a colorful app.

enter image description here
(I need to set the gray background to transparent or gradient)

My manager doesn't want to change the app layout and we don't have time for it now.

I have tried to follow this tutorial, but no success: https://stackoverflow.com/a/56458794/2430555

By setting segmentedControl.backgroundColor = UIColor.white you don't get a white background. This doesn't make sense.

Thank you.

Pedro Paulo Amorim
  • 1,838
  • 2
  • 27
  • 50

0 Answers0