Layer backed NSView with custom CALayer not calling updateLayer?

后端 未结 3 2298
别那么骄傲
别那么骄傲 2021-02-13 14:29

I have a custom layer-backed NSView and have overidden the makeBackingLayer method to return a custom CALayer subclass. I have also overriden wantsUpdateLayer to return true the

3条回答
  •  天命终不由人
    2021-02-13 15:05

    Did you forget to set the layerContentsRedrawPolicy and wantsLayer properties?

    self.wantsLayer = YES;
    self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawPolicy.OnSetNeedsDisplay;
    

提交回复
热议问题