0
votes

I have an NSScrollView object. It's layer-backed Apple suggest to improve the performance. Its document view is not layer-backed. This is a really basic configuration.

But I run into a problem: as you can see on the screenshot, I have a really annoying visual glitch when zooming the scroll view's content, no matter whether it's a single NSTextView or a group of text views bundled in an NSView. This annoying line appears over the border of NSTextView object. And it appears only after/during zooming.

I'm stuck with this bug for a months and I don't even know where to look. Tried to search but failed.

The screenshot with this glitch: enter image description here

UPDATE: if I set drawsBackground property of my NSTextView to false then the line won't appear but the performance becomes poor on long text. Even so, the glitch line still appears across margins of my view that holds every text views.

UPDATE 2: the latest TextEdit sample code from Apple has this bug too if you switch to page view and zoom the page with pinch-to-zoom gesture. That's confusing.

1

1 Answers

0
votes

Finally, I have found solution. The reason of those glitches was NSSplitView. It is a really buggy class (if you search for its issues). But I didn't expected it can produce such a glitches. When I turned off its layer-backing and disabled the Sidebar behavior of one of its item, everything has started to work as expected. No visual glitches when zooming the content of a scroll view.