GLKViewControllerDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/GLKit.framework
Availability
Available in iOS 5.0 and later.
Declared in
GLKViewController.h

Overview

Objects that implement the GLKViewControllerDelegate protocol may act as delegates for a GLKViewController object. A delegate is called each time the controller is about to display a new frame of animation. It is also called before the view controller’s rendering loop pauses or resumes sending updates.

Tasks

Handling an Update Event

Pause and Resume Notifications

Instance Methods

glkViewController:willPause:

Called before the rendering loop is paused or resumed.

- (void)glkViewController:(GLKViewController *)controller willPause:(BOOL)pause
Parameters
controller

The controller that is about to change the rendering loop state.

pause

YES if the loop is being paused, NO if it is being resumed.

Availability
  • Available in iOS 5.0 and later.
Declared In
GLKViewController.h

glkViewControllerUpdate:

Called before each frame is displayed. (required)

- (void)glkViewControllerUpdate:(GLKViewController *)controller
Parameters
controller

The controller that is about to display a new frame.

Discussion

This method is used by your application if it wants to updates state information on each frame of animation. A typical implementation might read the controller’s timeSinceLastUpdate property to determine how much time has actually passed, and use that time to calculate the positions for any objects to be rendered in the next frame.

Availability
  • Available in iOS 5.0 and later.
Declared In
GLKViewController.h