2

How to do it? setNeedsUpdate seems to be absent, and I couldn't find any recent articles on doing it, at least, in Swift.

RomaValcer
  • 2,786
  • 4
  • 19
  • 29

1 Answers1

6

If you want your nsview to redraw, set its property needsDisplay to true:

nsview.needsDisplay = true

If you only need to redraw part of it, specified by a CGRect called rect for example:

nsview.setNeedsDisplayInRect(rect)
vacawama
  • 150,663
  • 30
  • 266
  • 294