NSTextView: loading RTF, view does not update correctly until mouse is moved over the control
I have a pretty simple window that contains an NSTextView. I'm calling readRTFDFromFile: to load and display an rtf file on disk. I'm calling this from within the awakeFromNib handler. When the view appears on screen it only partially displays the contents of the rtf, the button portion of the view is blank/whit开发者_如何学编程e.
However, when the mouse is moved over the control, the rest of the rtf is correctly rendered, filling the previously blank space.
I'm at a bit of a loss as to why this is happening. Any ideas?
turn off "non-contiguous layout" in interface builder
A photo of the view would help immensely, but have you tried marking the view as needing display ([view setNeedsDisplay:YES]
) after reading in the RTF data?
精彩评论