Following is the code for UISegmentedControl
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObje
Use setEnabled:forSegmentAtIndex:
method to enable and disable the segments.
[segmentedControl setEnabled:NO forSegmentAtIndex:0];
if you want to disable the first segment.
For those who can be interested in the swift command:
Swift 2.3
segmentedControl.setEnabled(false , forSegmentAtIndex: 0);
Swift 3
self.segmentedControl.setEnabled(false, forSegmentAt: 0);