Can I show an UISegmentedControl object in vertical?

Viewed 16621

Is there anyone who can teach me how to show an UISegmentedControl object in vertical direction, instead of in horizontal direction?

5 Answers

Update of Bens answer for more modern swift versions.

segmentedControl.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi / 2))

Noting the casting of the value to a CGFloat and using the more modern Double.pi ( can be shortened to .pi too.

Related