views:

25

answers:

0

I have a CAEAGLLAYER in a normal UIView created using:

+ (Class)layerClass {
 return [CAEAGLLayer class];
}

I have a method

- (void)renderExistingPointsFromModel

That gets points from a database and renders it by presenting the renderbuffer at the end. A parent controller calls this method by:

[drawingCanvasView renderExistingPointsFromModel];

However, when this view is changed during transition (page flip up / down), the CAEAGLLAYER shows a blank view.

I somehow fixed this by using:

[drawingCanvasView performSelector:@selector(renderExistingPointsFromModel) withObject:nil afterDelay:0.0];

This made the method after the run loop and it works, but the OpenGL layer only shows after the animation is finished.