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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM