标签:
1.使用 NSTimer 来实现
[NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(setNeedsDisplay) userInfo:nil repeats:YES];
2.使用 CADisplayLink 来实现
CADisplayLink *link = [CADisplayLink displayLinkWithTarget:self selector:@selector(setNeedsDisplay)];
[link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
标签:
原文地址:http://www.cnblogs.com/cjt5132/p/4615735.html