- (void) initializeTimerWithNSTimer { CGFloat interval = 1.0f / 50.0f; [NSTimer scheduledTimerWithTimeInterval:interval target:self selector:@selector(animateBallNSTimer:) userInfo:nil repeats:YES]; } - (void) initializeTimerWithCADisplayLink { _timer = [CADisplayLink displayLinkWithTarget:self selector:@selector(animateBallCADisplayLink)]; _timer.frameInterval = 2; [_timer addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; }