UILabel / text animation on IPhone?

You can use core animation for that with timer and all the kit or you can just use the methof on UIView to start and commit animation and animation event to start over again Try something like : (void)animateLoop { myLabel. Frame = CGRectMake(-myLabel.bounds.size. Width, 100, myLabel.bounds.size.

Width, myLabel.bounds.size. Height); UIView beginAnimations:@"timesquare" context:nil; UIView setAnimationDuration:1.0; UIView setAnimationDidStopSelector:@selector(animateLoop); myLabel. Frame = CGRectMake(480, 100, myLabel.bounds.size.

Width, myLabel.bounds.size. Height); UIView commitAnimations; }.

You can use core animation for that with timer and all the kit or you can just use the methof on UIView to start and commit animation and animation event to start over again. Try something like : -(void)animateLoop { myLabel. Frame = CGRectMake(-myLabel.bounds.size.

Width, 100, myLabel.bounds.size. Width, myLabel.bounds.size. Height); UIView beginAnimations:@"timesquare" context:nil; UIView setAnimationDuration:1.0; UIView setAnimationDidStopSelector:@selector(animateLoop); myLabel.

Frame = CGRectMake(480, 100, myLabel.bounds.size. Width, myLabel.bounds.size. Height); UIView commitAnimations; }.

Funny that I mentioned it above! – Joe Dec 29 '10 at 17:10 Where should I put this animation loop? – Joe Dec 29 '10 at 17:12 Wherever you want, as soon as you will start it, the label will start animating!

(and timesquare was for you ;-)) – VdesmedT Dec 29 '10 at 17:28 Added the piece of code as - is to my viewDidLoad mthod, text does not appear. Oh, and about the Timesquare thing - I know, it was a joke :-)) – Joe Dec 29 '10 at 18:10.

If you want your label remain at a fixed location you can move the text inside the label, for example using a NSTimer that fires and calls a methods to update your UiLabel in regular (second or so) Intervals: NSString * longText = NSString stringWithString:@"this is a long text"; // begin loop here NSString * firstLetter = longText substringToIndex:1); NSString * otherLetters = longText substringFromIndex:1); longText = otherLetters stringByAppendingString:firstLetter; UILable. Text = longText; // wait here a second or so // end loop.

(void)viewDidLoad { self animateLoop; super viewDidLoad; } (void)animateLoop { mylab. Text=@"SAAAAdiiiii"; mylab. Frame = CGRectMake(-mylab.bounds.size.

Width, 100, mylab.bounds.size. Width, mylab.bounds.size. Height); UIView beginAnimations:@"timesquare" context:nil; UIView setAnimationDuration:5; UIView setAnimationRepeatAutoreverses:(YES); UIView setAnimationRepeatCount:10; mylab.

Frame = CGRectMake(480, 100, mylab.bounds.size. Width, mylab.bounds.size. Height); UIView commitAnimations; }.

The final location of the frame (note that we are not changing the frame's size during the animation) that we previously calculated to be in the lower-right. CGFloat appFrameWidth = appFrame.size. CGFloat appFrameHeight = appFrame.size.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions