get string value from UISegmentedControl

Solution 1:

Objective-C

NSString *title = [segment titleForSegmentAtIndex:segment.selectedSegmentIndex];

Swift:

let title = segment.titleForSegment(at: segment.selectedSegmentIndex)

Solution 2:

[segmentedControl titleForSegmentAtIndex:int];

For the current selected index

[segmentedControl titleForSegmentAtIndex:[segmentedControl selectedSegmentIndex]];

Solution 3:

Swift 3:

segmentedControl.titleForSegment(at: segmentedControl.selectedSegmentIndex)