NSTextView: loading RTF, viewing is not updated correctly until the mouse is moved around the control

I have a pretty simple window containing an NSTextView. I call readRTFDFromFile: to load and display the rtf file on disk. I call this from the awakeFromNib handler. When the view appears on the screen, it only partially displays the contents of rtf, part of the button in the view is empty / white.

However, when the mouse moves over the control, the rest of rtf displays correctly, filling up previously empty space.

I am losing a little why this is happening. Any ideas?

+3
source share
2 answers

, ([view setNeedsDisplay:YES]) RTF?

+2

" "

+4

Source: https://habr.com/ru/post/1770035/


All Articles