六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 107|回复: 0

IOS 实现滚动文字

[复制链接]

升级  56%

8

主题

8

主题

8

主题

童生

Rank: 1

积分
28
 楼主| 发表于 2013-1-4 01:35:47 | 显示全部楼层 |阅读模式
IOS 实现滚动文字

<div id="cnblogs_post_body">   当然最好应该使用block的方式,在此只是标记一下。
    self.firstButton.backgroundColor = [UIColorgreenColor];
    CGRect frame = self.firstButton.frame;
    frame.origin.x = 320;
    self.firstButton.frame = frame;
    [UIViewbeginAnimations:@"testAnimation"context:NULL];
    [UIViewsetAnimationDuration:8.8f];
    [UIViewsetAnimationCurve:UIViewAnimationCurveLinear];
    [UIViewsetAnimationDelegate:self];
    [UIViewsetAnimationRepeatAutoreverses:NO];
    [UIViewsetAnimationRepeatCount:999999];
    frame = self.firstButton.frame;
    frame.origin.x = -frame.size.width;
    self.firstButton.frame = frame;
    [UIViewcommitAnimations];
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表