Я хочу создать анимацию круга uiimageview. Когда uiimage закончил в self.left
, он сразу же вызовет снова после uiimageview.right
. Я хочу, чтобы анимация была похожа, но моя анимация была плохой. Потому что когда он закончил self.left
, он начал self.right
. :( Но я хочу выглядеть как изображение:
[ ----(end of image)--------- --------(start of image)]
Me. I did it.
[ -----(end of image)---------- ]
Когда закончен конец изображения, он идет после.
Мой код выглядит так:
//for start
[UIView beginAnimations:nil context:nil];
imageView.left = - imageView.width;
// imageView2.left = - imageView.width;
[UIView setAnimationDuration:140.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(moveToLeft:finished:context:)];
[UIView commitAnimations];
-(void)moveToLeft:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
{
imageView.left = self.right;
imageView2.left = self.right + 3600;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:140.0];
[UIView setAnimationDelegate:self];
imageView.left = -imageView.right;
imageView2.left = -imageView2.right;
// imageView.left = - imageView.width;
[UIView setAnimationDidStopSelector:@selector(moveToLeft:finished:context:)];
[UIView commitAnimations];
// imageView.frame.origin.x = imageView.left - self.right
}
Как я могу это сделать. Спасибо