我在我的代码中有一些动画块,当我升级到iPhone OS4时导致我的问题。我读过,现在建议使用块动画,所以我想我会看看这是否解决了我的问题。我用的是以下类型的代码,以使动画...UIView和UIImageView之间关于动画的关系... iPhone SDK
[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];
我现在打算改变这种使用这种类型的动画之前(从http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW111拍摄)
[UIView的animateWithDuration :0.2
动画:^ {view.alpha = 0.0; }
完成:^(BOOL finished){[查看 removeFromSuperview]; }]
我的问题是我可以用UIImageView而不是UIView使用上述块动画吗?基本上我想我想知道有什么不同,如果我动画一个UIView,我只是动画UIImage里面的UIView?这跟UIImageView一样吗?!
对不起,我很困惑:-s