index=0; // timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:layer selector:@selector(setNeedsDisplay) userInfo:nil repeats:YES]; [arrM removeAllObjects]; Link = [CADisplayLink displayLinkWithTarget:layer selector:@selector(setNeedsDisplay)]; [Link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];