I am using Xcode 4.2 and have a UIViewController representing one of the scenes.
In it, inside viewWillAppear
i have
[NSTimer scheduledTimerWithTimeInterval: FramesPerSecond target:self
selector:@selector(gameLoop) userInfo:nil repeats:YES];
Inside gameLoop
method, i have
[[self view] setNeedsDisplay];
Problem:
drawRect
method is not being called (As i understand it it should be called from setNeedsDisplay
Question:
- Is it possible to define
drawRect
method inside aUIViewController
class and is so how should one declare it? It is called on aUIView
as i understand it. - If is it not possible, how would you address the situation using Xcode 4.2?