tags:

views:

103

answers:

0

1

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...... 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?