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];

原文地址:https://www.cnblogs.com/iosdev/p/2819421.html