One.
Two, code.
Viewcontroller.m
- (void) Viewdidload {[Super viewdidload];//Additional setup after loading the view, typically from a nib.//The scroll bar above UILabel *label = [[UILabel alloc]initwithframe:cgrectmake (5,40M500,40)]; label.text=@"111111111111122222222"; Label.backgroundcolor=[Uicolor Redcolor]; [Self.view Addsubview:label];//Scroll from right to left[Self Animationwithlabel:label];}//Scrolls the font from right to left-(void) Animationwithlabel: (uilabel*) Labelshow; {CGRect frame = Labelshow.frame; frame.origin.x = W; Labelshow.frame =< Span style= "COLOR: #000000" > frame; [UIView beginanimations:@ "testanimation" Context:null]; [UIView setanimationduration:6.0f]; [UIView Setanimationcurve:uiviewanimationcurvelinear]; [UIView setanimationdelegate:self]; [UIView Setanimationrepeatautoreverses:no]; [UIView setanimationrepeatcount:9999999999]; frame =< Span style= "COLOR: #000000" > Labelshow.frame; frame.origin.x =-290 frame; [UIView commitanimations];}
"Code Note" ios-fonts scroll from right to left