Yes there is!
Consider that we have a segmented control that contains 3 segments:

This is actually a view that contains 3 subviews typed as a UISegment . If we try to print this segmented subviews control (suppose we connected it to the desired view controller as segmentedControl IBOutlet):
class ViewController: UIViewController { // MARK:- IBOutlets @IBOutlet weak var segmentedControl: UISegmentedControl! override func viewDidLoad() { super.viewDidLoad() for view in segmentedControl.subviews { print(view) } } }
The log should display something similar to:
UISegment: 0x7febebc06980; frame = (229 0; 114 29); layer = CALayer: 0x60000002edc0 UISegment: 0x7febebe140c0; frame = (114 0; 114 29); layer = CALayer: 0x618000231800 UISegment: 0x7febebe14d30; frame = (0 0; 113 29); layer = CALayer: 0x6180002319c0
This way you can access segments in a segmented control as a UISegment , so apply the necessary editing to it as a UIView. For example, if you want to rotate the second segment, you can implement:
override func viewDidLoad() { super.viewDidLoad() for view in segmentedControl.subviews[1].subviews { print(view) view.transform = CGAffineTransform(scaleX: -1, y: 1) } }
As you can see, the segment also has subviews:
UISegmentLabel: 0x7f8b51701770; frame = (0 0; 64 22.5); text = "Second"; opaque = NO; userInteractionEnabled = NO; layer = _UILabelLayer: 0x610000091530
UIImageView: 0x7f8b51701470; frame = (114 0; 1 1); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; tag = -1030; layer = CALayer: 0x610000031480
So, you must rotate all of these subzones, as implemented above the code snippet.
The conclusion will be:

The same approach should be applied with segmented controls that have images instead of names:
Before rotation:

After rotation:

source share