views:

286

answers:

1

I want to create a frame and fill it with a segmented control. How would i do this???

+1  A: 

If by filling a frame with a segmented control, you mean you want to add a segmented control as a subview of another view with a specific frame, you could do this:

CGRect frame = CGRectMake(X_ORIGIN,Y_ORIGIN,WIDTH,HEIGHT);
UISegmentedControl * seg = [[UISegmentedControl alloc] initWithFrame:frame];
[viewYouWantToAddTheControlTo addSubview:seg];
[seg release];

Does that help?

Kevlar
I want to put the segmented in the frame
zPesk
this code does that
Roger Nolan