iphone 的滾動文字條(俗稱跑馬燈)

[position_l sizeToFit]; it

CGRect frame = position_l.frame; io

frame.origin.x = 320; test

position_l.frame = frame; im

[UIView beginAnimations:@"testAnimation" context:NULL]; co

(frame.size.width/position_l.frame.origin.x)>1?[UIView setAnimationDuration:(frame.size.width/position_l.frame.origin.x)*8.8f]:[UIView setAnimationDuration:8.8f];position

[UIView setAnimationCurve:UIViewAnimationCurveLinear]; context

[UIView setAnimationDelegate:self]; commit

[UIView setAnimationRepeatAutoreverses:NO]; 

[UIView setAnimationRepeatCount:999999]; 

frame = position_l.frame; 

frame.origin.x = -frame.size.width;

position_l.frame = frame; 

[UIView commitAnimations];

相關文章
相關標籤/搜索