This compiles:
import AppKit
class CustomView: NSView, CALayerDelegate {}
This does not however:
import AppKit
import SwiftUI
class CustomView: NSView, CALayerDelegate {}
This is an error:
... error: redundant conformance of 'CustomView' to protocol 'CALayerDelegate'
class CustomView: NSView, CALayerDelegate {}
^
... note: 'CustomView' inherits conformance to protocol 'CALayerDelegate' from superclass here
class CustomView: NSView, CALayerDelegate {}
^
Any idea how to fix this?
If you remove CALayerDelegate
conformance, delegate methods are not called.