How can I get the name of the selected UISegment in the UISegmentControl?

The class of the selected segment is displayed as a UISegment, to which I cannot find a reference to the class. Surely there is a way to access the header associated with the selected index?

+3
source share
1 answer

From the UISegmentedControldocumentation:

NSString * selectedTitle = [mySegmentedControl titleForSegmentAtIndex:[mySegmentedControl selectedSegmentIndex]];

+6
source

Source: https://habr.com/ru/post/1744688/


All Articles