views:

71

answers:

2

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

A: 

This control is horizontal only. From the UISegementedControl documentation:

A UISegmentedControl object is a horizontal control made of multiple segments, each segment functioning as a discrete button. A segmented control affords a compact means to group together a number of controls.

You will have to do this as a custom control.

Cannonade
+1  A: 

You can always modify the transform on the segmented control.

segmentedControl.transform = CGAffineTransformMakeRotation(M_PI / 2.0);

Ben Gottlieb
+1 for answering the question :). I do wonder about the usability of a rotated segmented control.
Cannonade
Yeah, I wasn't passing judgement on whether it was a good idea or not ;-)
Ben Gottlieb
@ben-gottlieb An admirable quality :)
Cannonade