I would like to modify UISegmentedControl with a subclass to remove the rounded corners. I can't seem to set the cornerRadius. Making the SegmentedControl wider than the screen (and therefor "chop" off the corners) is not an option since I have 4 or 5 segments and they would then vary in size.
Is there a way to do this?
Thanks
To make the corner square use the following code:
segmentContrl.layer.borderColor=*anycolor*.CGColor; segmentContrl.layer.cornerRadius = 0.0; segmentContrl.layer.borderWidth = 1.5f;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With