Question

I have a GLKView because I use some OpenGLES for some animations with some graphics. All these animations are working very good until I implement a viewWillAppear method.

I have two timers intialized in the viewDidLoad:

updateTimer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(updateScene) userInfo:nil repeats:YES];
paintTimer = [NSTimer scheduledTimerWithTimeInterval:0.02 target:self selector:@selector(paintScene) userInfo:nil repeats:YES];

NSLog tells me that the two methods (updateScene and paintScene) are called correctly and my graphics are changed correctly.

Now as long as I have no viewWillAppear method everything animates fine. When I implement a viewWillAppear method, updateScene and paintScene are still called but nothing changes. no animation. viewWillAppear is empty. no code inside.

Why are all animations blocked?

Was it helpful?

Solution

Make sure viewWillAppear calls [super viewWillAppear:animated];
This may fix your problem. Per Apple's docs:

If you override this method, you must call super at some point in your implementation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top