문제

I've a GLKViewController which renders an OpenGL 2.0 scene. All works fine, but when I segue to a new storyboard scene (via a UINav Controller) and then return to the OpenGL ES 2.0 scene, the update and drawRect methods in the view controller are no longer called.

I've tried setting self.paused to NO in the viewDidLoad method, but to no avail.

Can anyone suggest what is happening here ?

The GLKViewController contains a UIView, both of which are set in the storyboard. This is the segue to the view from the GLKViewController :

if ([segue.identifier isEqualToString:@"GoToEntry"]) {

    DetailViewController *d = segue.destinationViewController;
    d.selection = currentSelection;

}
도움이 되었습니까?

해결책

Ok - the problem was that GLKViewController sets paused to YES when view exits. viewWillAppear wasn't actually being called - moving self.paused to viewDidAppear solved the problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top