I am new to iphone development. I used NSTimer scheduledTimerWithTimeInterval 0.01 seconds for game loop. The game consists drawscreen function inwhich I use CGContextClipToRect to clip the large images for animation. But the speed 0.01 seconds is working in simulator only not in the iphone(device). How can i overcome this problem? I respect your reply......you have told about it in previous post. But i could not understand..... the timer code is in view controller as
(void)viewDidLoad {
GameView *main = [[GameView alloc]
initWithFrame:[[UIScreen mainScreen] applicationFrame]];
main.backgroundColor = [UIColor blackColor];
self.view = main;
[main release];
self.tim = [NSTimer scheduledTimerWithTimeInterval: 0.01
target: self selector: @selector (gameloop:) userInfo: nil repeats: YES];
[super viewDidLoad];
}
Anyone can help me?