欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

滚动文字的实现

程序员文章站 2023-12-22 09:06:52
...
CGRect frame = label.frame;
frame.origin.x = -180;
frame.origin.y = -220;
label.frame = frame;
    
[UIView beginAnimations:@"testAnimation" context:NULL];
[UIView setAnimationDuration:8.8f];  
[UIView setAnimationCurve:UIViewAnimationCurveLinear];     
[UIView setAnimationDelegate:self];  
[UIView setAnimationRepeatAutoreverses:NO];     
[UIView setAnimationRepeatCount:999999]; 
    
frame = label.frame;
frame.origin.x = 350;
frame.origin.y = 300;
label.frame = frame;
[UIView commitAnimations];
 
相关标签: iPhone IOS 滚动

上一篇:

下一篇: