0

I would like to know if it is possible to have two CADisplayLink in an app ?

sorry for my english I'm french

Taryn East
  • 27,486
  • 9
  • 86
  • 108
bernard langue
  • 147
  • 1
  • 10
  • 1
    Well, the whole I idea is to have only one. Why do you need more than one? – Rad'Val Jul 23 '11 at 23:52
  • That's right, the display link is by definition linked to screen refresh; If you have more than one, both will be sync'd to the refresh and hence sync'd between themselves. One use would be Display Link A firing every frame (interval=1) and Display Link B firing every other frame (interval=2), But you should rather have one link, one call back, and inside that callback perform task A every frame and task B every other frame. – Nicolas Miari Jun 22 '12 at 07:21

1 Answers1

1

You can just have one CADisplayLink call periodically call one method which then calls the two methods that your two frame sync timers would have called. That way you control the order in which they are called (or potentially use GCD on multi-core devices), or how they are interleaved, etc.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153