당신은 스레드와 더 나은 성능, 이런 식으로 뭔가를 시도 얻을 수 있습니다 :
- (void) gameLoop
{
while (running)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self renderFrame];
[pool release];
}
}
- (void) startLoop
{
running = YES;
#ifdef THREADED_ANIMATION
[NSThread detachNewThreadSelector:@selector(gameLoop)
toTarget:self withObject:nil];
#else
timer = [NSTimer scheduledTimerWithTimeInterval:1.0f/60
target:self selector:@selector(renderFrame) userInfo:nil repeats:YES];
#endif
}
- (void) stopLoop
{
[timer invalidate];
running = NO;
}
renderFrame
방법에서 당신은 프레임 버퍼를 준비 프레임을 그리고 화면의 프레임 버퍼를 제시한다. (추신 : 다양한 종류의 게임 루프와 장점과 단점에 대해 이 있습니다.
iPhone 개발자 예제를 보았습니까? (Touch Fighter 또는 CrashLanding 예를 들어, 조명일지도 모른다.) –
나는 많은 예를보고 인터넷에서 대안을 연구했다. 그래서 나는 이미 몇 가지 대안을 알고있다. 나는 정말로 다른 사람들이 최선의 대안이라고 생각하는 것인가? 극도의 쇼 rt 프로젝트를 사용하면 조사에 저장된 모든 시간이 큰 도움이됩니다. –