How to Color the “Overshoot” Background of an NSCollectionView

跟風遠走 提交于 2019-12-05 23:48:57
  1. In Interface Builder, select the CollectionView in the document outline.
  2. In the Utilities window, show the Attributes inspector.
  3. Set the desired color in the Primary color selector control.

Note: the Ray Wenderlich tutorial that you referenced sets the background color of the collection view programmatically. You'll either want to remove that line, or ensure that you are setting the same color that you chose in step 3 above.

for changing it programmatically in Swift 3 use e.g.:

collectionView.backgroundColors = [NSColor.black]

Just change self.view.wantsLayer = true in self.collectionView.wantsLayer = true

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!