Following is the code for UISegmentedControl
UISegmentedControl
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObje
Use setEnabled:forSegmentAtIndex: method to enable and disable the segments.
setEnabled:forSegmentAtIndex:
[segmentedControl setEnabled:NO forSegmentAtIndex:0];
if you want to disable the first segment.