4

My problem is quite simple, on my UIVIewController i have a custom UIView which is animated using CAAnimation and UIViewAnimation, i also have a UIScrollView, when the scrollView is scrolling the animated UIView stop all its animations !

timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self 

selector:@selector(updateClock:) userInfo:nil repeats:YES];
hourHand.transform = CATransform3DMakeRotation (hourAngle+M_PI, 0, 0, 1);
...

In the Animated View i use : NSTimer, QuartzCore, and UIViewAnimation.

How can avoid this ? It is because i use a custom UIView ? (I'm still a beginner)

Thanks for all !

user2206906
  • 1,310
  • 2
  • 13
  • 18

1 Answers1

8

You may be interested in this SO question. UIScrollView scroll event blocks UIView animation

The proposed solution is to add the timer to the current loop.

[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
Community
  • 1
  • 1
marsei
  • 7,691
  • 3
  • 32
  • 41