I'm trying to get an NSCollectionView
in my application to use a vibrant (semi-blurred transparent) background. I've successfully implemented this for other views by simply adding the view (for instance a label or a progress indicator) to an NSVisualEffectView
. I've also tried this on the NSCollectionViewItem
view that is used by the NSCollectionView
to render its contents. This also works.
But I cannot get the NSCollectionView
to use a vibrant background. I've tried this by adding the NSScrollView
that contains the NSCollectionView to an NSVisualEffectView
but this does not work. I've also set the drawsBackground
property to false (both in Interface Builder and programatically: collectionScrollView?.drawsBackground = false
, and collectionScrollView?.backgroundColor = NSColor.clearColor()
.
The view hierarchy is:
Window
- View
- Split View
- Custom View (with a source list)
- Custom View
- Visual Effect View
- Scroll View
- Clip View
- Collection View
NB. I've also tried changing the background color of the NSScrollView
that contains the NSCollectionView
to any other color (e.g. red) but this also does not work (either in Interface Builder or programatically). The background stays white.