У меня анимация воспроизводится нормально. Но в конце анимации анимация останавливается. Я хочу, чтобы анимация зацикливалась. Как я могу это сделать? Вот мой код:
- (void) startTicker
{
if (self.timerIsRunning) return;
self.timerIsRunning = YES;
NSTimer *newTimer = [NSTimer timerWithTimeInterval:(0.1) target:self selector:@selector(onTimer:) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:newTimer forMode:NSDefaultRunLoopMode];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:100.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDelay:0.0];
[UIView setAnimationDidStopSelector:@selector(moveToLeft:finished:context:)];
[UIView commitAnimations];
}
-(void)moveToLeft:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
{
imageView.left = 800;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:100.0];
[UIView setAnimationDelay:0.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self cache:YES];
imageView.right = 800;
[UIView setAnimationDidStopSelector:@selector(moveToLeft2:finished2:context2:)];
[UIView commitAnimations];
}
moveToLeft:finished:context
из своегоmoveToLeft2:finished2:context2
метода? :-) - person Michael Dautermann   schedule 29.11.2011