title: Relation between UIView and UIImageView regarding animations... iPhone SDK
body: <p>I have some animation blocks in my code which are causing my problems when I upgrade to iPhone OS4. I have read that it is now advised to use block-animations so I thought I would see if this solved my problems. Before I was using the following type of code to make an animation...</p>
  
  <pre><code>[UIImageView beginAnimations:nil context:NULL]; 
  
  [UIImageView setAnimationDuration:30.0];
  
  [UIImageView setAnimationRepeatCount:1e100f];
  
  [UIImageView setAnimationCurve:UIViewAnimationCurveLinear];
  
  [UIView setAnimationDelegate:self];
  
  [UIView setAnimationDidStopSelector:@selector(stop)];
  
  wheel.transform =CGAffineTransformMakeRotation(M_PI*-0.5);
  
  [UIImageView commitAnimations];
  </code></pre>
  
  <p>I am now planning to change this to use this type of animation (taken from <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW111" rel="nofollow noreferrer">http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW111</a>)</p>
  
  <blockquote>
    <p>[UIView animateWithDuration:0.2</p>
    
    <p>animations:^{  view.alpha = 0.0; }</p>
    
    <p>completion:^(BOOL finished){  [view
    removeFromSuperview]; }]</p>
  </blockquote>
  
  <p>My question is can I use the above block animation with UIImageView rather than UIView? Basically I guess I want to know what the difference is, if I animate a UIView would I just be animating a UIImage which is inside a UIView? Is this the same as a UIImageView then?!</p>
  
  <p>Sorry I'm confused :-s</p>