// 선언
@interface RenderView : UIView
{
CADisplayLink *displayLink;
}
// 초기화
displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(runLoop)];
[displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
// 루프함수
-(void)runLoop {
NSLog(@"runLoop");
[self setNeedsDisplay];
No comments:
Post a Comment