title: UISegmentedControl crashes if app installed using release config
body: <p>I add UISegmentedControl in header view of the 1st section in table and it works fine in simulator or on iPad in debug mode. However, if I produce an archive for over-the-air distribution (that uses release config) and install it on iPad then when I try using Segmented Control it freezes (it does not switch to the chosen segment and method associated with UISegmentedControl does not get executed either) and then app crashes. </p>
  
  <p>So, it has to be the difference between debug and release configuration, so I investigated it and found that if in PROJECT\TARGETS\Apple LLVM6.1 config\Optimization Level\ I change value for my distribution from (Fastest,Smallest) to what I have for debug (None), then UISegmentedControl begins to work fine!</p>
  
  <p>Has anybody seen that or have other suggestion beside meddling with optimization level.</p>
  
  <p>iPad iOS8.1, XCode 6.4</p>
  
  <p>here is my code, though it seems like the problem is not there:</p>
  
  <pre><code>- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
  {
      if (section == 0) {
      UIView *header = [[[UIView alloc] init] autorelease];
      header.backgroundColor = [UIColor clearColor];
  
      UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(18.0, 51.0, 100.0, 37.0)];
      headerLabel.backgroundColor = [UIColor clearColor];
      headerLabel.textColor = [UIColor grayColor];
      headerLabel.font = [UIFont systemFontOfSize:14];
      headerLabel.text = @"IMAGE";
      [header addSubview:headerLabel];
      [headerLabel release];
  
      UISegmentedControl *actionSwitcher0 = [[UISegmentedControl alloc] initWithItems:@[@"Event", @"Question"]];
      [actionSwitcher0 setFrame:CGRectMake(20.0, 20.0, 140, 28)];
      [actionSwitcher0 addTarget:self action:@selector(changeActionType:) forControlEvents:UIControlEventValueChanged];
      actionSwitcher0.tag=1235;
      [header addSubview:actionSwitcher0];
      [actionSwitcher0 release];
  
      return header;
      }
  return nil;
  }
  </code></pre>