title: How to check which segment is selected with UISegmentedControl
body: <p>I have an UIImagePicker which when you click on a button is shown though I have recently added an option using segments where you can use the camera though I can't seem to check which segment is selected. This is the code that I have got so far:</p>
  
  <pre><code>- (IBAction)addPicture:(id)sender {
      if (_photoControl.selected == 0) {
          CGRect rect = CGRectMake(0, 0, 753, 118);
          [popOverController presentPopoverFromRect:rect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
      } else {
  
      }
  }
  </code></pre>
  
  <p>Though the if statement is always true.</p>
  
  <p>This is probably really obvious of what to do though I'm stumped.</p>
  
  <p>Thanks in advance</p>