-2

Looking for something like

@property (weak, nonatomic) IBOutlet UISegmentedControl *modeSelect;

if(modeselect.valueChanged){}

Other answers I found confuse me as I don't get the square brackets notation. Please do not send me tutorials on understanding that until after main question has been answered.

rmaddy
  • 298,130
  • 40
  • 468
  • 517
MANICX100
  • 741
  • 1
  • 7
  • 17
  • 2
    If you don't understand the basic syntax of Objective-C then you really do need to learn that first. You can't write an app in a language if you don't understand the basic syntax of the language. Do yourself a favor and take time to find some good Objective-C tutorials before you do anything else. Otherwise you won't even understand any answers you get to your question. – rmaddy Dec 31 '15 at 18:38
  • Now that the main question is answered, you should have a look at [Good resources for learning ObjC](http://stackoverflow.com/q/1374660). – jscs Dec 31 '15 at 18:41

1 Answers1

1

You need to add an action to your segmented control.

You can do so in your storyboard directly (ctrl-drag from the segmented control to an empty space in your view controller, and select "value changed"). You'll get an IBAction method that will be called when the value changes.

jcaron
  • 16,007
  • 5
  • 28
  • 43