IOS 实现滚动文字

   当然最好应该使用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];

posted on 2012-12-15 16:11  小浪鼓  阅读(8199)  评论(0编辑  收藏  举报

导航