NSView display causes immediate drawRect call, but subviews changes not shown untill the next NSApp loop step

59 views Asked by At

I have programmatically created NSButton as subviews of main window NSView, and wish to change button text color while some long processing is running.

[myButton setAttributedTitle:colorTitle];
[myView setNeedsDisplay:YES];

works correct, but only after return to NSApplication loop. Replacing setNeedsDisplay:YES with display causes immediate call of drawRect, but buttons are still not redrawn, while callback process is running. Is it possible to flush subviews redrawing out of NSApp loop ?

0

There are 0 answers