Drawing anywhere on the screen in Mac OS X / Objective-C

I am trying to create a small utility that draws an arbitrary shape on the screen under the mouse pointer (basically, like drawing a line following the cursor). It may be anywhere on the screen not in a specific window.

My problem is that I canโ€™t understand how to draw on the โ€œscreenโ€. Is there a layer or view object that I can use that references the general view of os? I looked at NSScreen and canโ€™t see anything there.

Any examples or ideas would be great.

Thank.

+3
source share
1 answer

, ( ). , . Apple , .

+4

All Articles