Posted By

espinallab on 04/20/10


Tagged

UISegmentedControl


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

umang_nine
Tintenklecks
cnathan


Get the Title of a UISegmentedControl


 / Published in: Objective C
 

URL: http://www.iphonedevsdk.com/forum/iphone-sdk-development/11100-uisegmentedcontrol-setselectedsegmentindex.html

  1. //Call it like this
  2. NSString * selectedCategory = [self getTitleForSelectedSegment:segmentedControl];
  3.  
  4. - (NSString *) getTitleForSelectedSegment: (UISegmentedControl *) segment {
  5. return [segment titleForSegmentAtIndex:[segment selectedSegmentIndex]];
  6. }

Report this snippet  

You need to login to post a comment.