title: UISegmentedControl won't change value
body: <p>I am trying to create a <code>UISegmentedControl</code> programatically. I have a <code>UIViewController</code> in the storyboard with nothing in it.</p>
  
  <p>.h file</p>
  
  <pre><code>UISegmentedControl *segmentedControl;
  NSString *feedBackButtonTitle;
  NSString *contactsButtonTitle;
  </code></pre>
  
  <p>and here are the property declarations.</p>
  
  <pre><code>@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
  -(void) segmentedControlIndexChanged;
  </code></pre>
  
  <p>In <code>viewDidLoad:</code> I have initalized and added the <code>UISegmentedControl</code>.</p>
  
  <pre><code>   NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];
  if ([language isEqualToString:@"en"]){
      contactsButtonTitle = [[[configFileDictionary objectForKey:@"Contacts"] objectForKey:@"Label"] objectForKey:@"en"];
      feedBackButtonTitle = [[[[[configFileDictionary objectForKey:@"Contacts"] objectForKey:@"Contact"]objectForKey:@"Feedback"]objectForKey:@"Label"]objectForKey:@"en"];
  }
  else if([language isEqualToString:@"fr"]){
      contactsButtonTitle = [[[configFileDictionary objectForKey:@"Contacts"] objectForKey:@"Label"] objectForKey:@"fr"];
      feedBackButtonTitle = [[[[[configFileDictionary objectForKey:@"Contacts"] objectForKey:@"Contact"]objectForKey:@"Feedback"]objectForKey:@"Label"]objectForKey:@"fr"];
  
  }
  NSArray *itemsArray = [[NSArray alloc] initWithObjects:contactsButtonTitle, feedBackButtonTitle, nil];
  segmentedControl = [[UISegmentedControl alloc] initWithItems:itemsArray];
  segmentedControl.segmentedControlStyle = UISegmentedControlStylePlain;
  //segmentedControl.selectedSegmentIndex = 0;
  segmentedControl.frame = CGRectMake(0.0f, 0.0f, 320.0f,40.0f);
  [segmentedControl addTarget:self action:@selector(segmentedControlIndexChanged) forControlEvents:UIControlEventValueChanged];
  
   //  [self.view addSubview:segmentedControl];
  
  // Create view for contact display.
  [self createViews];
  </code></pre>
  
  <p>and this the <code>(void)segmentedControlIndexChanged</code></p>
  
  <pre><code>-(void)segmentedControlIndexChanged
  {
      switch (self.segmentedControl.selectedSegmentIndex)
      {
          case 0:
              [self createViews];
              break;
          case 1:
              [self showFeedbackForm];
              break;
          default:
              break;
      }
  }
  </code></pre>
  
  <p>This is showing the segmented control on the screen just fine, but when I click on the options in the segmentedcontrol, it always goes into the option case 0. segmented control and opens <code>[self createViews];</code></p>
  
  <p>On inserting breakpoints at the line <code>case 0</code>, I noticed that the option _selectedSegment in segmentedControl is 1. This doesn't make any sense. </p>