Layer backed NSView with custom CALayer not calling updateLayer?

后端 未结 3 2246
别那么骄傲
别那么骄傲 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 14:51

    Surely you fixed it by now, but for future readers I found a possible explanation by reading the NSView documentation!

    If the canDrawSubviewsIntoLayer property is set to YES, the view ignores the value returned by this method. Instead, the view always uses its drawRect: method to draw its content.

提交回复
热议问题