Skip to content

Instantly share code, notes, and snippets.

@christianselig
Created February 8, 2017 03:08
Show Gist options
  • Save christianselig/91ce5ed476dd4adfb6f650d1e82f2442 to your computer and use it in GitHub Desktop.
Save christianselig/91ce5ed476dd4adfb6f650d1e82f2442 to your computer and use it in GitHub Desktop.
bodyNode.willDisplayNodeContentWithRenderingContext = { context in
UIGraphicsPushContext(context)
let rectanglePath = UIBezierPath(rect: CGRect(x: 10, y: 10, width: 10, height: 10))
UIColor.magenta.setFill()
rectanglePath.fill()
UIGraphicsPopContext()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment