您的位置:首页 > 移动开发 > IOS开发

iOS跑马灯效果的源代码

2015-09-25 21:05 579 查看
iOS中实现跑马灯效果的代码片段:

[labelShow sizeToFit];

CGRect frame = labelShow.frame;

frame.origin.x = 320;

labelShow.frame = frame;

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

[UIView setAnimationDuration:8.8f];

[UIView setAnimationCurve:UIViewAnimationCurveLinear];

[UIView setAnimationDelegate:self];

[UIView setAnimationRepeatAutoreverses:NO];

[UIView setAnimationRepeatCount:999999];

frame = labelShow.frame;

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

labelShow.frame = frame;

[UIView commitAnimations];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: