Following is my code to scroll the UILabel horizontal such that it appears as the marquee effect. But the animation starts with the label in center and scrolls till its width and again stats from the center. I want continuous scrolling like marquee from left to right.Can any body help me please.
-(void)loadLabel{
if (messageView) {
[messageView removeFromSuperview];
}
NSString *theMessage = text;
messageSize = [theMessage sizeWithFont:font];
messageView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, messageSize.width, 916)]; //x,y,width,height
[messageView setClipsToBounds:NO]; // With This you prevent the animation to be drawn outside the bounds.
[self.view addSubview:messageView];
lblTime = [[RRSGlowLabel alloc] initWithFrame:CGRectMake(0, 0, messageSize.width, 916)]; //x,y,width,height
[lblTime setBackgroundColor:[UIColor yellowColor]];
lblTime.font = font;
[lblTime setText:theMessage];
lblTime.glowOffset = CGSizeMake(0.0, 0.0);
lblTime.glowAmount = 90.0;
lblTime.glowColor = color;
[lblTime setClipsToBounds:NO];
[lblTime setTextColor:color];
[lblTime setTextAlignment:UITextAlignmentLeft];
lblTime.frame = messageView.bounds ; //x,y,width,height
[messageView addSubview:lblTime];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:speed];
[UIView setAnimationRepeatCount:HUGE_VALF];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:messageView cache:YES];
lblTime.frame = CGRectMake(-messageSize.width, 45, messageSize.width, 916); //x,y,width,height
[UIView commitAnimations];
}