开发者

How can I get the title of the selected UISegment in a UISegmentControl?

开发者 https://www.devze.com 2022-12-29 22:11 出处:网络
The class of the selected segment is shown as UISegment, which I ca开发者_StackOverflow中文版n\'t find a class reference to. Surely there is a way to access the title associated with the selected inde

The class of the selected segment is shown as UISegment, which I ca开发者_StackOverflow中文版n't find a class reference to. Surely there is a way to access the title associated with the selected index?


From UISegmentedControl documentation:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号