阅读背景:

如何触摸和拖动动画图像?这是我的动画代码:

来源:互联网 
- (void)viewDidLoad
{
    [super viewDidLoad];


        [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:4];
    [UIView setAnimationRepeatCount:50];
    [UIView setAnimationRepeatAutoreverses:NO];

    CGPoint abc =chem1.center;

    abc.y= 480;
    chem1.center=abc; 

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:4];
    [UIView setAnimationRepeatCount:50];
    [UIView setAnimationRepeatAutoreverses:NO];

    CGPoint def =chem2.center;

    def.y= 480 ;
    chem2.center=def; 

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:4];
    [UIView setAnimationRepeatCount:50];
    [UIView setAnimationRepeatAutoreverses:NO];

    CGPoint hij =nat1.center;

    hij.y= 480;
    nat1.center=hij; 

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:4];
    [UIView setAnimationRepeatCount:50];
    [UIView setAnimationRepeatAutoreverses:NO];

    CGPoint klm =nat2.center;

    klm.y= 480;
    nat2.center=klm;  
}
- (void)viewDidLoad
{
    [super viewDidLoad];



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: