Get the Title of a UISegmentedControl


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your 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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.