9

enter image description here

How does the rectangle redraw? Is this on a NSWindow? or NSScreen? How can I do that on OS X native's APIs? Thanks.

DNB5brims
  • 29,344
  • 50
  • 131
  • 195
  • 1
    http://stackoverflow.com/questions/20357960/drawing-selection-box-rubberbanding-marching-ants-in-cocoa-objectivec – Daniyar Dec 09 '14 at 11:03
  • 2
    You would create a transparent overlay window over the screen and draw the outline and semi-transparent rectangle on that window. – Ken Thomases Dec 09 '14 at 11:06
  • i was about to comment same, @KenThomases. After that you need to subclass view and windows and drawRect...bezier path etc – Anoop Vaidya Dec 09 '14 at 11:08
  • So, is this mean that the NSWindows need to keep resizing? – DNB5brims Dec 09 '14 at 11:12
  • You do not have to subclass NSWindow, if the area of the selection is insider your app's window. It is only needed, if you want to draw such a rect outside your own windows. – Amin Negm-Awad Dec 09 '14 at 12:58

0 Answers0