swift - layer cannot be modified in NSCollectionViewItem -


i subclassed nscollectionviewitem , want modify layer of view, can't work.

override func awakefromnib() {     self.view.layercontentsredrawpolicy = nsviewlayercontentsredrawpolicy.onsetneedsdisplay     self.view.layer!.backgroundcolor = nscolor.whitecolor().cgcolor     self.view.layer!.bordercolor = nscolor.blackcolor().cgcolor     self.view.layer!.borderwidth = 3     self.view.updatelayer() } 

i activated core layer animation in ib of every single view in project, still no change. how can make changes views layer?


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -