Skip to content

Instantly share code, notes, and snippets.

@tylergaw
Created January 30, 2017 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylergaw/1c7ba1d8480224278a8b3d32bbd83b4b to your computer and use it in GitHub Desktop.
Save tylergaw/1c7ba1d8480224278a8b3d32bbd83b4b to your computer and use it in GitHub Desktop.
// Create a new NSImage instance by any init method
var img = $.NSImage.alloc.initByReferencingFile(/*the image path*/);
// Don't use parens "()" when a method takes zero arguments
img.lockFocus;
// and
img.unlockFocus;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment