title: UISlider animation with alpha
body: <p>I'm trying to make UISliders that animate to be greyed out when they cannot be used.</p>
  
  <p>Here is the code in my UISlider subclass:</p>
  
  <pre><code>    - (void)setSymbol:(NSString *)s {
  symbol = s;
  
  float newValue = [[S76PresetManager sharedManager] getValueForKey:symbol];
  [self setValue:newValue animated:YES];  
  
  if (symbol == @"" || symbol == @"e_none") {
      // gray out the slider
      [self setUserInteractionEnabled:NO];
      [UIView beginAnimations:nil context:nil];       
      [UIView setAnimationDuration:0.5];
  
      [self setAlpha:0.5];
  
      [UIView commitAnimations];
  
  } else {
      // reactivate the slider
      [self setUserInteractionEnabled:YES];
      [UIView beginAnimations:nil context:nil];       
      [UIView setAnimationDuration:0.5];
  
      [self setAlpha:1.0];
  
      [UIView commitAnimations];      
  }
  </code></pre>
  
  <p>}</p>
  
  <p>If the slider's symbol property is set to @"" or @"e_none", it will gray out the slider and cause it to not be interactive. However the line <code>[self setValue:newValue animated:YES]</code> seems to "cancel out" the setAlpha animation in some cases. </p>
  
  <p>Is there any way I can simultaneously set the value of the slider and change its alpha using UIView animations? </p>
  
  <p>Thanks in advance.</p>