ĬameraNode. This clipping came from a sample rendering a screenshot to disk (PNG format) every frame: GameViewController This way produces an image with alpha, if needed, by setting both the SCNView and SKScene backgroundColors to clear. There's another way that pivots off adding your SpriteKit scene as the overlaySKScene to an empty SCNView, then calling SCNView's snapshot method.
#Mac os x change screenshot destination windows#
a do not include windows attached to selected windowsįiles where to save the screen capture, 1 file per screen W start interaction in window selection mode T Take the picture after a delay of, default is 5 t image format to create, default is png (other options include pdf, jpg, tiff and other formats) Hold Shift to change size in one direction only (horizontal or vertical) Hold Option for center. While dragging: Hold Spacebar to move selected area. S in window capture mode, capture the screen not the window Take a screenshot or screen recording (new in Mojave) Cmd-Shift-5: Take a screenshot of the entire screen: Cmd-Shift-3: Take a screenshot of a selected area: Cmd-Shift-4 and Drag over an area. P screen capture output will open in Preview Equivalent of go2shell (finder toolbar app) to select current folder as screenshot destination go2shell is a little app that you can drag onto a finder window toolbar - clicking on it will open a terminal window at that location. o in window capture mode, do not capture the shadow of the window M screen capture output will go to a new Mail message m only capture the main monitor, undefined if -i is set Space key - toggle between mouse selection andĮscape key - cancels interactive screen shot i capture screen interactively, by selection or windowĬontrol key - causes screen shot to go to clipboard d display errors to the user graphically C capture the cursor as well as the screen. c force screen capture to go to the clipboard It is not in the manpage, but if you run screencapture -help you'll see it. You can add -w to force Window Selection Mode and/or -c to send captured data to Clipboard.Īpparently, there is also an undocumented -R option to screencapture that allows you to specify a specific rectangle's coordinates that you wish to capture. Task.launchPath = "/usr/sbin/screencapture"
It uses the standard screencapture command that you would use from the command-line: #!/usr/bin/env xcrun swift
I do not know the " Apple-approved" way, but maybe this will get you going for now.