title: Appearance customized segmentcontrol odd behavior
body: <p>I have a <code>UISegmentedControl</code> with a customized appearance, and I believe I have all of the necessary assets to have the correct appearance, and in most cases the appearance is as desired, however when I tap on one of the segments, before releasing, the edges of the segment, right about where the divider image is supposed to be, the appearance suddenly becomes incorrect.  Attached are some screenshots, and here is my code for setting the different images:</p>
  
  <pre><code>    UIImage *segmentUnselectedBG = [[UIImage imageNamed:@"SegmentUnselectedBG"] resizableImageWithCapInsets:UIEdgeInsetsMake(3, 3, 3, 3)];
      UIImage *segmentSelectedBG = [[UIImage imageNamed:@"SegmentSelectedBG"] resizableImageWithCapInsets:UIEdgeInsetsMake(4, 4, 4, 4)];
      UIImage *segmentDividerNoSelect = [[UIImage imageNamed:@"SegmentDividerNoSelect"] resizableImageWithCapInsets:UIEdgeInsetsMake(3, 3, 3, 3)];
      UIImage *segmentDividerLeftSelect = [[UIImage imageNamed:@"SegmentDividerLeftSelect"] resizableImageWithCapInsets:UIEdgeInsetsMake(4, 4, 4, 3)];
      UIImage *segmentDividerRightSelect = [[UIImage imageNamed:@"SegmentDividerRightSelect"] resizableImageWithCapInsets:UIEdgeInsetsMake(4, 3, 4, 4)];
      UIImage *segmentDividerBothSelect = [[UIImage imageNamed:@"SegmentDividerBothSelect"] resizableImageWithCapInsets:UIEdgeInsetsMake(4, 4, 4, 4)];
  
      [self.programControlsSegment setBackgroundImage:segmentUnselectedBG forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
      [self.programControlsSegment setBackgroundImage:segmentSelectedBG forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
      [self.programControlsSegment setDividerImage:segmentDividerNoSelect forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
      [self.programControlsSegment setDividerImage:segmentDividerLeftSelect forLeftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
      [self.programControlsSegment setDividerImage:segmentDividerRightSelect forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
      [self.programControlsSegment setDividerImage:segmentDividerBothSelect forLeftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
  </code></pre>
  
  <p>Neither segment selected, appearance is correct:</p>
  
  <p><img src="https://i.stack.imgur.com/WVbc9.png" alt="Neither selected - Correct"></p>
  
  <p>Left Segment selected, appearance is correct:</p>
  
  <p><img src="https://i.stack.imgur.com/ATbos.png" alt="Left selected - Correct"></p>
  
  <p>Left segment selected, and user pressing on the left segment, appearance is incorrect</p>
  
  <p><img src="https://i.stack.imgur.com/2Ff2v.png" alt="Left selected and highlighted - Incorrect"></p>
  
  <p>Left segment selected, and user pressing on right segment, appearance is incorrect</p>
  
  <p><img src="https://i.stack.imgur.com/1vHSg.png" alt="Left selected, right highlighted - Incorrect"></p>
  
  <p>Right segment is selected, and user is pressing on left segment, appearance is incorrect</p>
  
  <p><img src="https://i.stack.imgur.com/jZVCw.png" alt="Left highlighted, right selected - Incorrect"></p>
  
  <p>Are there other segment states that I should be setting the divider image for?</p>
  
  <p>EDIT:</p>
  
  <p>This issue seems to be isolated to behavior only in iOS 7.  Prior to this version, there did not seem to be a different state for the segments for when the user is actively pressing down on the segment</p>