Skip to content

Instantly share code, notes, and snippets.

@CanTheAlmighty
Last active May 7, 2025 05:33
Show Gist options
  • Save CanTheAlmighty/ee76fbf701a61651fe439fcd6d25f41d to your computer and use it in GitHub Desktop.
Save CanTheAlmighty/ee76fbf701a61651fe439fcd6d25f41d to your computer and use it in GitHub Desktop.
DisplayLink for OSX
@adamnemecek
Copy link

Note that since mac 10.11 there's CVDisplayLinkSetOutputHandler which makes setting up of the callback simpler.

@iOSBrett
Copy link

iOSBrett commented Apr 8, 2023

And they say swift is easy and requires fewer lines of code than objc... I setup a DisplayLink in about 5 lines of code in ObJC.
Swift is for people who love writing complicated code

This is for the Mac though. CADisplayLink for iOS is easy in either Swift or ObjC.

@seyoung-hyun
Copy link

@CanTheAlmighty Thanks your code :)
Can I use your code in my commercial app?
Please let me know how I can use the code for commercial distribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment