I have defined a protocol and added HeaderDoc documentation to the method in this protocol. It appears correctly when I Option+Click the method:
However, when I Option+Click the implementation within a controller that implements this protocol, the documentation is not showing up:
My expectation is that the documentation I wrote for the protocol would show up in the controller, similar to the documentation from Apple:
How do I get my protocol documentation to be visible elsewhere?
If you document the protocol's method implementation within a protocol extension, the documentation will then be visible within any type that conforms to the protocol.
If you omit the extension's documentation, the
canDo
documentation from the protocol doesn't show up anywhere else but the protocol itself, as you noticed.