The segment control is cant able to relocate the position in vertical.It shows like in the image .Can any one help me to positioning the segment control.
int offset = BAR_OFFSET + 40 * bars.count;
for (int i = bars.count; i < guessRows; i++)
{
UISegmentedControl *bar = [[UISegmentedControl alloc] initWithItems:
[NSArray arrayWithObjects:@"", @"", @"", nil]];
bar.segmentedControlStyle = UISegmentedControlStyleBar;
bar.transform = CGAffineTransformMakeRotation(M_PI_2);
bar.momentary = YES;
[bar addTarget:self action:@selector(submitGuess:)
forControlEvents:UIControlEventValueChanged];
CGRect frame = bar.frame;
frame.origin.y = offset; // position it below the last bar
frame.origin.x = 20; // give it some padding on the left
[self.view addSubview:bar]; // add the bar to the main view
[bars addObject:bar];
[bar release];
}