MonoTouch.CoreAnimation.CADisplayLink Class
Synchronization object between your animations and the display refresh.

See Also: CADisplayLink Members

Syntax

[MonoTouch.Foundation.Register("CADisplayLink", true)]
public class CADisplayLink : MonoTouch.Foundation.NSObject

Remarks

The display link object is a timer that can be used to synchronize your drawing with the screen refresh rate. Once you create your CADisplayLink, you need to add it to a runloop by using the CADisplayLink.AddToRunLoop method.

Using the display link ensures that your application will not suffer from display glitches like screen tearing and micro-stuttering.

You can pause the display link by setting the CADisplayLink.Paused property. And you can remove your display link from any registered run loops by calling the CADisplayLink.Invalidate method.

By default the timer is triggered sixty times per second. If your application does not need this level of precision, set the FrameInterval property to skip one or more updates. For example, setting FrameInterval to two, would invoke your target method thirty times per second.

c# Example

GLKView myGlView;

void Setup ()
{
    CADisplayLink displayLink = CADisplayLink.Create (Display);
    displayLink.AddToRunLoop (NSRunLoop.Main, NSRunLoop.UITrackingRunLoopMode); 
}

void Display ()
{
    myGLView.Display ();
}

Related content

Requirements

Namespace: MonoTouch.CoreAnimation
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0