title: iOS - iPhone : UISlider track image disappearing randomly
body: <p>I have a customized UISlider which has its track image disappear sometimes. It happens at random and when its parent view controller is pushed to visible (I never see it actually disappear).</p>
  
  <p>Here is my code for setting up the UISlider:</p>
  
  <pre><code>timeSlider = [[UISlider alloc] initWithFrame:CGRectMake(55, 8, 210, 23)];
  timeSlider.backgroundColor = [UIColor clearColor]; 
  
  UIImage *blutrackImg = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"bluetrack" ofType:@"png"]];
  UIImage *whitetrackImg = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"whitetrack" ofType:@"png"]];
  
  //UIEdgeInsetsMake(top,left,bottom,right)
  UIImage *stetchLeftTrack = [blutrackImg stretchableImageWithLeftCapWidth:9.0 topCapHeight:0.0]; 
  UIImage *stetchRightTrack = [whitetrackImg stretchableImageWithLeftCapWidth:9.0 topCapHeight:0.0];
  [timeSlider setThumbImage: [UIImage imageNamed:@"whiteslide2.png"] forState:UIControlStateNormal];
  [timeSlider setMinimumTrackImage:stetchLeftTrack forState:UIControlStateNormal];
  [timeSlider setMaximumTrackImage:stetchRightTrack forState:UIControlStateNormal];
  
  timeSlider.continuous = NO;
  [timeSlider addTarget:self action:@selector(trackTime:) forControlEvents:UIControlEventValueChanged];
  [self.view addSubview:timeSlider];
  </code></pre>
  
  <p>I am building on iOS 5.0. Has anyone ever ran into such a thing?</p>