I have a NSCollectionView within a NSVisualEffectView within a NSPopover. Everytime when it's refreshing(add, remove, reload NSCollectionViewItem, or even just click buttons on the NSCollectionViewItem's view), it has glitches on the controls.
Here's a screenshot I try to get when it's opening:
It's more or less like this but only when the redrawing happens:
Also, if I put a button with border off on it, when clicked the color went off, just like the flickering:
I tried to set background color in different views/controls, but seems the NSCollectionView will always be black/white (depending on UI color selection) when it's empty:
Did I missed anything?
EDIT:
By adding scrollView.needsDisplay = false/true
before/after the item change will make some of the flickers gone. Still, most the problems still exist.
Also, if I forcely enabled horizontal scroller bar or disabled autoresize subview, the flicker will no longer show when add/remove items.
Ok, seems disabling the "Autoresize Subviews" on the problematic view will do the trick.