8

So I see this code:

class ViewWithDisplayLayer {
func viewDisplayLayer() -> CALayer? {
FatalErrorMustOverride()
return nil
}
}

If only Swift bad some way of defining some sort of interface or protocol with methods to be implemented by a class without using class inheritance and wouldn't it be great if that feature also gave a compile time error if you forgot to override/implement said method(s). If only.....

😳

Comments
Add Comment