UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(10,300, 300, 100)];
label3.text =@"噜啦啦噜啦啦噜啦";
[self.view addSubview:label3];
CGRect frame = label3.frame;
frame.origin.x = -180;
label3.frame = frame;
[UIView beginAnimations:@"testAnimation"context:NULL];
[UIView setAnimationDuration:8.8f];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationDelegate:self];
[UIView setAnimationRepeatAutoreverses:NO];
[UIView setAnimationRepeatCount:999999];
frame = label3.frame;
frame.origin.x =350;
label3.frame = frame;
[UIView commitAnimations];
跑马灯效果动画
最新推荐文章于 2025-06-03 09:43:08 发布